summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylandinputdevice_p.h
diff options
context:
space:
mode:
authorGiulio Camuffo <giulio.camuffo@jollamobile.com>2015-01-04 18:27:51 +0200
committerGiulio Camuffo <giulio.camuffo@jollamobile.com>2015-01-13 14:01:20 +0100
commit101698bd0ffa3e51186eb14cfdb317526cc9512b (patch)
tree7738b89d69d47e8c88c51ef20fc886e960a3ec3f /src/client/qwaylandinputdevice_p.h
parent7142ca521df1daa251f3f4cfb97a5c76928df2da (diff)
Send proper mouse enter events
The wl_pointer.event carries the surface local position of the pointer. Notify Qt of it, without pretending it to be a motion event. Change-Id: Ibbe1d125a93b478f9c350a50bfea25b01f628178 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Diffstat (limited to 'src/client/qwaylandinputdevice_p.h')
-rw-r--r--src/client/qwaylandinputdevice_p.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/client/qwaylandinputdevice_p.h b/src/client/qwaylandinputdevice_p.h
index f1c264545..a5da8bd0f 100644
--- a/src/client/qwaylandinputdevice_p.h
+++ b/src/client/qwaylandinputdevice_p.h
@@ -260,7 +260,29 @@ public:
QList<QWindowSystemInterface::TouchPoint> mPrevTouchPoints;
};
-
+class QWaylandPointerEvent
+{
+public:
+ enum Type {
+ Enter,
+ Motion
+ };
+ inline QWaylandPointerEvent(Type t, ulong ts, const QPointF &l, const QPointF &g, Qt::MouseButtons b, Qt::KeyboardModifiers m)
+ : type(t)
+ , timestamp(ts)
+ , local(l)
+ , global(g)
+ , buttons(b)
+ , modifiers(m)
+ {}
+
+ Type type;
+ ulong timestamp;
+ QPointF local;
+ QPointF global;
+ Qt::MouseButtons buttons;
+ Qt::KeyboardModifiers modifiers;
+};
QT_END_NAMESPACE