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

The cached device pixel ratio value was stale when closing a window with fractonal scaling

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4: Low
    • None
    • 6.6.1
    • GUI: High-DPI
    • None
    • Linux/Wayland

    Description

      We get the warning in the following chain of events is:

      • using wayland with a scale that isn't an integer
      • close the window with the icon.

      This triggers:

      • QWindow::close which calls setVisible to false, triggering a queued exposeEvent marking the window as hidden
      • QWindow::destroy which kills the platform window
      • we process the deferred (in)exposeEvent
      • without a platform window we go into a fallback based the screens
      • On wayland, we don't have accurate information for screens with floating scale accuracy, only a legacy int, so it shows as a change.

      This seems to happen on most windows.

      In a sense it's a false positive, because if we didn't have the QWindowPrivate::get(window)->updateDevicePixelRatio() line, we wouldn't be detecting a stale value.
      We also don't care about the DPR when the window is inexposed.

      Attachments

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

        Activity

          People

            sorvig Morten Sørvig
            davidedmundson David Edmundson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes