summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/client/qwaylandinputdevice.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp
index 567620ba5..e0a5ce944 100644
--- a/src/client/qwaylandinputdevice.cpp
+++ b/src/client/qwaylandinputdevice.cpp
@@ -253,6 +253,8 @@ void QWaylandInputDevice::handleWindowDestroyed(QWaylandWindow *window)
mKeyboard->mFocus = 0;
mKeyboard->stopRepeat();
}
+ if (mTouch && window == mTouch->mFocus)
+ mTouch->mFocus = 0;
}
void QWaylandInputDevice::setDataDevice(QWaylandDataDevice *device)
@@ -739,6 +741,9 @@ void QWaylandInputDevice::Touch::touch_down(uint32_t serial,
wl_fixed_t x,
wl_fixed_t y)
{
+ if (!surface)
+ return;
+
mParent->mTime = time;
mParent->mSerial = serial;
mFocus = QWaylandWindow::fromWlSurface(surface);