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

Windows: Application look is corrupted after it has been automatically moved to primary screen by Windows when unplugging the monitor

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P5: Not important
    • None
    • 5.5.1
    • QPA: Windows
    • None
    • Windows 10, laptop with 2 screens and a dual switchable graphic card

    Description

      On a laptop (windows 10), using an external monitor, if you disconnect the external monitor then the font/style/palette of the application gets corrupted.

      This also occurs if the laptop goes in power saving mode (dual switchable graphics cards).

      This problem affects also QtCreator, not only my own application.

      To reproduce it:
      Connect the laptop to an external monitor and swith display to it
      Launch QtCreator
      Disconnect the external monitor, QtCreator is now shown on the laptop's screen
      Hover the mouse on the QtCreator menubar or other part to see the font and style changing.

      The problem is more serious in our application, I suppose because we use specific font sizes.

      I have filtered out WM_DISPLAYCHANGE event using a QAbstractNativeEventFilter and the problem disappeared, but I am afraid that I probably broke something doing so.

      Thanks
      Philippe Lelong

      Attachments

        1. diag_output.txt
          5 kB
        2. diag_output2.txt
          5 kB
        3. qtcreator1.png
          qtcreator1.png
          52 kB
        4. qtcreator2.png
          qtcreator2.png
          53 kB
        5. qtvlm_1.png
          qtvlm_1.png
          797 kB
        6. qtvlm_2.png
          qtvlm_2.png
          795 kB

        Issue Links

          Activity

            People

              kleint Friedemann Kleint
              maitai Philippe Lelong
              Votes:
              10 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated: