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

List of screens reported has less screens than actual if Device Name not unique

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.2
    • GUI: Window management
    • None
    • At least 2 screens which report the same name. My personal setup, both at work is a laptop (primary screen) and 2 external monitors, in each case, of the same brand and make.
    • Windows

    Description

      For the windows platform, `QWindowsScreenManager::handleScreenChanges()` checks if a screen is not already in the list by comparing against `newData.deviceName`.

      This device-name is not guaranteed to be unique however: Since this is queried internally from windows via the `szDevice` field from the `MONITORINFOEXA` structure (see the `monitorData` function also in `qwindowsscreen.cpp`). - See also this stackoverflow question: How can I uniquely identify a monitor? - Stack Overflow

      The discussed behaviour can cause problems (up to a access violation / crash) when, for example, you ask which screen a window is on, and it happens to be one of the discarded ones (since there can only be one with that device name).

      As a result, we believe we have been unable to fix a bug (as a workaround) where a sub-window doesn't want to open over the main window.

      More seriously, but also more tentatively, we think it may indirectly be responsible for a number of crashes.

      For completions sake, I'll attach a list of the github issues reported by our users (though I don't suspect you can do much with it, as it's very indirect):

      https://github.com/Ultimaker/Cura/issues/11907
      https://github.com/Ultimaker/Cura/issues/12102
      https://github.com/Ultimaker/Cura/issues/12248
      https://github.com/Ultimaker/Cura/issues/12264
      https://github.com/Ultimaker/Cura/issues/12197
      https://github.com/Ultimaker/Cura/issues/12306

       

      (While there where a lot of seemingly similar issues in the bug-tracker, I could not find this particular one. I also hope that the code-analysis is enough, but I'm willing to put in the time for a complete reproduction if really required.)

       

      Attachments

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

        Activity

          People

            vestbo Tor Arne Vestbø
            remcoburema_um Remco Burema
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes