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

QGuiApplication::screens() returns incomplete list of Screens

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 6.5.2
    • GUI: Window management
    • None
    • Windows 10 / 11
    • Windows

    Description

      Symptom

      On some monitors with split-screen function, only one of the two screens is returned by QGuiApplication::screens().
      This leads to calculation errors when moving windows to the non-delivered screen.

      Example

      affected display: Philips 499P9H

      Diagnostic

      call qtdiag from Qt5 and Qt6 on same computer

      Qt5.15.15 Qt6.5.2
      Screens: 2, High DPI scaling: inactive
      1. 0 "\\.\DISPLAY2" Depth: 32 Primary: yes
          Manufacturer:
          Model:
          Serial number:
          Geometry: 2560x1440+0+0 Available: 2560x1392+0+0
          Virtual geometry: 5120x1440+0+0 Available: 5120x1392+0+0
          2 virtual siblings
          Physical size: 1193x336 mm  Refresh: 59 Hz Power state: 0
          Physical DPI: 54.5046,108.857 Logical DPI: 96,96 Subpixel_None
          DevicePixelRatio: 1 Pixel density: 1
          Primary orientation: 2 Orientation: 2 Native orientation: 0 OrientationUpdateMask: 0
      2. 1 "\\.\DISPLAY1" Depth: 32 Primary: no
          Manufacturer:
          Model:
          Serial number:
          Geometry: 2560x1440+2560+0 Available: 2560x1392+2560+0
          Virtual geometry: 5120x1440+0+0 Available: 5120x1392+0+0
          2 virtual siblings
          Physical size: 1193x336 mm  Refresh: 59 Hz Power state: 0
          Physical DPI: 54.5046,108.857 Logical DPI: 96,96 Subpixel_None
          DevicePixelRatio: 1 Pixel density: 1
          Primary orientation: 2 Orientation: 2 Native orientation: 0 OrientationUpdateMask: 0
      Screens: 1, High DPI scaling: inactive
      1. 0 "PHL 499P9 (2)" Depth: 32 Primary: yes
          Manufacturer: Philips Consumer Electronics Company
          Model: PHL 499P9
          Serial number: AU0221201XXXX
          Geometry: 2560x1440+2560+0 Available: 2560x1392+2560+0
          Physical size: 1193x336 mm  Refresh: 59.951 Hz Power state: 0
          Physical DPI: 54.5046,108.857 Logical DPI: 96,96 Subpixel_None
          DevicePixelRatio: 1
          Primary orientation: 2 Orientation: 2 Native orientation: 0
         A2

      Code analyze shows up that someone changed the identification method in indexOfMonitor from former Qt5 QWindowsScreenData::name to Qt6 QWindowsScreenData::serialNumber. But this fails on displays that returns the same serial for both screens of one physical display (like Philips do).

      Suggestion

      Change the identification method back again to QWindowsScreenData::deviceName because this is made unique by windows.

      Attachments

        Issue Links

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

          Activity

            People

              timothee.keller Timothée Keller
              Alex_S Alexander Shaya
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes