From e581d7dda49ac9838303da45acd7667db67940aa Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Thu, 16 Aug 2018 13:49:16 +0200 Subject: [PATCH] Client: Clear entered screens when resetting window Previously, windows that were hidden and shown again would have the old list of entered screens. Aside from occasionally getting the current screen wrong, this also polluted the log with bogus warnings about unexpected enter events. This problem could be seen quite easily by opening, closing and opening a menu. [ChangeLog][QPA plugin] Fixed a bug where a window that was hidden and then shown on different screen would still think it was on the first screen. Change-Id: I1b27433ea6607a218384d814ae4c16b9c4395948 Reviewed-by: Paul Olav Tvete --- src/plugins/platforms/wayland/qwaylandwindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/platforms/wayland/qwaylandwindow.cpp b/src/plugins/platforms/wayland/qwaylandwindow.cpp index b88541ad850..7149a2adb01 100644 --- a/src/plugins/platforms/wayland/qwaylandwindow.cpp +++ b/src/plugins/platforms/wayland/qwaylandwindow.cpp @@ -247,6 +247,7 @@ void QWaylandWindow::reset(bool sendDestroyEvent) mSubSurfaceWindow = nullptr; if (isInitialized()) destroy(); + mScreens.clear(); if (mFrameCallback) { wl_callback_destroy(mFrameCallback);