summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylanddisplay.cpp
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2016-10-10 17:52:15 +0200
committerJohan Helsing <johan.helsing@qt.io>2016-10-11 09:43:38 +0000
commit0049240a2b7d8691f09224e1542919ddbbb0d864 (patch)
tree4ea648f755216db02abf1f28ee7236b417bb2a99 /src/client/qwaylanddisplay.cpp
parente3cc20df4290ef0364206e930ed43ae06bd6ed58 (diff)
Client: Remove windows from keyboard focus list when destroyed
This fixes the undefined behavior in tst_WaylandClient::touchDrag and mouseDrag Note: The test still fails if run twice in a row, but it appears to be deterministic. Task-number: QTBUG-56187 Change-Id: Ib45d82224f004d1324f2ce4d6b7df05ee36c04f5 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/client/qwaylanddisplay.cpp')
-rw-r--r--src/client/qwaylanddisplay.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp
index d94afcab5..3fd2aa565 100644
--- a/src/client/qwaylanddisplay.cpp
+++ b/src/client/qwaylanddisplay.cpp
@@ -422,6 +422,12 @@ void QWaylandDisplay::handleKeyboardFocusChanged(QWaylandInputDevice *inputDevic
mLastKeyboardFocus = keyboardFocus;
}
+void QWaylandDisplay::handleWindowDestroyed(QWaylandWindow *window)
+{
+ if (mActiveWindows.contains(window))
+ handleWindowDeactivated(window);
+}
+
void QWaylandDisplay::handleWaylandSync()
{
// This callback is used to set the window activation because we may get an activate/deactivate