summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylandinputdevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/qwaylandinputdevice.cpp')
-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 44a21658..8f0e32f6 100644
--- a/src/client/qwaylandinputdevice.cpp
+++ b/src/client/qwaylandinputdevice.cpp
@@ -259,6 +259,8 @@ void QWaylandInputDevice::handleWindowDestroyed(QWaylandWindow *window)
mKeyboard->mFocus = 0;
mKeyboard->stopRepeat();
}
+ if (mTouch && window == mTouch->mFocus)
+ mTouch->mFocus = 0;
}
void QWaylandInputDevice::setDataDevice(QWaylandDataDevice *device)
@@ -745,6 +747,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);