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>
This commit is contained in:
parent
2bf4dd1302
commit
120abd19a9
@ -2273,6 +2273,8 @@ void QGuiApplicationPrivate::processWindowStateChangedEvent(QWindowSystemInterfa
|
|||||||
void QGuiApplicationPrivate::processWindowScreenChangedEvent(QWindowSystemInterfacePrivate::WindowScreenChangedEvent *wse)
|
void QGuiApplicationPrivate::processWindowScreenChangedEvent(QWindowSystemInterfacePrivate::WindowScreenChangedEvent *wse)
|
||||||
{
|
{
|
||||||
if (QWindow *window = wse->window.data()) {
|
if (QWindow *window = wse->window.data()) {
|
||||||
|
if (window->screen() == wse->screen.data())
|
||||||
|
return;
|
||||||
if (window->isTopLevel()) {
|
if (window->isTopLevel()) {
|
||||||
if (QScreen *screen = wse->screen.data())
|
if (QScreen *screen = wse->screen.data())
|
||||||
window->d_func()->setTopLevelScreen(screen, false /* recreate */);
|
window->d_func()->setTopLevelScreen(screen, false /* recreate */);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user