summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylandinputdevice_p.h
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2019-02-06 09:30:09 +0100
committerJohan Helsing <johan.helsing@qt.io>2019-02-27 14:05:12 +0000
commit9b05557a6325497485b582c3891367aa7dfee245 (patch)
tree1a41664042efc8fab499cf3828e5868d79cc7776 /src/client/qwaylandinputdevice_p.h
parent539bba3f334843772e2ff9569f2bce633ce191f0 (diff)
Client: Don't send illegal wl_pointer.set_cursor requests
When the cursor focus' wl_surface is destroyed, or the pointer leaves a surface, we have to reset the enter serial to avoid sending illegal set_cursor requests. Change-Id: I0c886e4123acb4aebd325b07bf15b9d3fa8589da Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Diffstat (limited to 'src/client/qwaylandinputdevice_p.h')
-rw-r--r--src/client/qwaylandinputdevice_p.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/client/qwaylandinputdevice_p.h b/src/client/qwaylandinputdevice_p.h
index cb382da31..50b1af385 100644
--- a/src/client/qwaylandinputdevice_p.h
+++ b/src/client/qwaylandinputdevice_p.h
@@ -250,8 +250,9 @@ private:
};
-class Q_WAYLAND_CLIENT_EXPORT QWaylandInputDevice::Pointer : public QtWayland::wl_pointer
+class Q_WAYLAND_CLIENT_EXPORT QWaylandInputDevice::Pointer : public QObject, public QtWayland::wl_pointer
{
+ Q_OBJECT
public:
explicit Pointer(QWaylandInputDevice *seat);
~Pointer() override;
@@ -277,6 +278,12 @@ protected:
uint32_t axis,
wl_fixed_t value) override;
+private slots:
+ void handleFocusDestroyed() { invalidateFocus(); }
+
+private:
+ void invalidateFocus();
+
public:
void releaseButtons();
@@ -285,7 +292,6 @@ public:
uint32_t mEnterSerial = 0;
#if QT_CONFIG(cursor)
struct {
- uint32_t serial = 0;
QWaylandCursorTheme *theme = nullptr;
int themeBufferScale = 0;
QScopedPointer<CursorSurface> surface;