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

        1. qtbug93368.zip
          5 kB
          Friedemann Kleint
        2. win_primary_screen_changed.patch
          2 kB
          Elric

        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