diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2021-06-25 13:02:02 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2021-08-02 12:16:24 +0000 |
commit | 6e250179229ebe7e2a056ba0e363592f4d1f6972 (patch) | |
tree | 8abad00f6728c6970d7929234d76ac49f611fe02 /src/plugins/platformthemes | |
parent | c13b98d9bcf911540ac63ab3511754f8d6b97a3d (diff) |
macOS: Stop relying on balanced CGDisplay reconfiguration callbacks
We were using CGDisplay callbacks to determine when a screen reconfiguration
had happened, and when it had propagated to changes in NSScreen.screens,
so that we could update our QScreen view of the world.
Unfortunately the CGDisplay callbacks were not deterministic enough to
use as a signal for when a reconfigure had completed.
Since we can't rely on NSApplicationDidChangeScreenParametersNotification
either (it comes in too late), we're now resorting to updating our QScreens
at every chance we get:
- On every CGDisplay reconfiguration ending
- On QCocoaWindow::windowDidChangeScreen() as a result of AppKit
moving the window.
- On NSApplicationDidChangeScreenParametersNotification
- On QCocoaScreen::get() as a last resort
Since the result of these updates are only reflected as QScreen property
updates or QGuiApplication signals if a change actually occurred, it should
be safe to update early and often.
Task-number: QTBUG-77656
Fixes: QTBUG-80193
Pick-to: 6.2 6.1 5.15
Change-Id: I98334a66767736d94ad2fcb169e65f0d8bc71a30
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/plugins/platformthemes')
0 files changed, 0 insertions, 0 deletions