diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-01-31 12:24:17 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-02-02 07:21:24 +0000 |
commit | 120abd19a915b2cadd3591f06794bc64ebcd80a4 (patch) | |
tree | 5ea3cf83056adfac2491f02aab461a47ab18e7c4 /src/gui | |
parent | 2bf4dd1302ad48e56925757cc9d12a252a95f6c4 (diff) |
Skip QWSIF::WindowScreenChanged events if the screen is unchanged
WindowScreenChanged events might be reported repeatedly from the QPA backends
until the event has reached GuiApplicationPrivate::processWindowScreenChangedEvent()
which sets the screen. Ignore events in case the screen is already correct.
Task-number: QTBUG-65580
Task-number: QTBUG-62971
Change-Id: Ie5fc9830771e816db942355efbe5a48e829914cb
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qguiapplication.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 3d85f47f34..5f4a1a0236 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -2273,6 +2273,8 @@ void QGuiApplicationPrivate::processWindowStateChangedEvent(QWindowSystemInterfa void QGuiApplicationPrivate::processWindowScreenChangedEvent(QWindowSystemInterfacePrivate::WindowScreenChangedEvent *wse) { if (QWindow *window = wse->window.data()) { + if (window->screen() == wse->screen.data()) + return; if (window->isTopLevel()) { if (QScreen *screen = wse->screen.data()) window->d_func()->setTopLevelScreen(screen, false /* recreate */); |