Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-93368

Windows: QGuiApplication::primaryScreenChanged is not emitted when changing primary screen

    XMLWordPrintable

Details

    • Windows
    • 01d55f020 (dev), 1248d78db (6.6), dcc0b4ab3 (tqtc/lts-6.5)

    Description

      Steps to reproduce:

      1. Open any Qt gui app, place a breakpoint in QWindowSystemInterface::handlePrimaryScreenChanged.
      2. Open display settings, change main display (you need at least two monitors for this to work).
      3. Breakpoint is never hit (and thus QGuiApplication:: primaryScreen is not changed, and QGuiApplication:: primaryScreenChanged is not emitted).

       

      I'm testing this on Win10 19041.928.

       

      I did some digging and it looks like the right place to call QWindowSystemInterface::handlePrimaryScreenChanged would be from inside the QWindowsScreen::handleChanges. I've attached a patch.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              shin1_okada Shinichi Okada (Inactive)
              elric Elric
              Votes:
              6 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes