summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2015-11-26 19:27:10 +0100
committerShawn Rutledge <shawn.rutledge@qt.io>2017-02-23 10:42:23 +0000
commitea615b421b76668332a3029ad31fa725b5bb9e58 (patch)
tree16955e7352d780807ec1cf00661efed468599055 /src/plugins/platforms/xcb
parent35fa30e65d26b9e4840cfa793ed8369b3475c1fd (diff)
handle TabletMove events during stylus hover
The main reason for this is to get feedback about the stylus orientation (angles and rotation) before the user presses it. For example an application might provide an image of the brush which rotates along with the stylus. As with mouse events, applications can distinguish hovering by the fact that no buttons are pressed. On the xcb platform we need to stop blocking the hover events, and in QWidgetWindow we need to send the event to the widget being hovered, while keeping the existing "grab" behavior: after pressing the stylus (or any button on the stylus or on the tablet), keep sending the events to the same widget until release. Task-number: QTBUG-26116 Change-Id: Iaed8b3b94961290dbb29b5fd2ea892fed7221685 Reviewed-by: Dmitry Kazakov <dimula73@gmail.com> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb')
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection_xi2.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
index f70c7138b3..e82a19a516 100644
--- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
@@ -1084,10 +1084,7 @@ bool QXcbConnection::xi2HandleTabletEvent(const void *event, TabletData *tabletD
break;
}
case XI_Motion:
- // Report TabletMove only when the stylus is touching the tablet or any button is pressed.
- // TODO: report proximity (hover) motion (no suitable Qt event exists yet).
- if (tabletData->buttons != Qt::NoButton)
- xi2ReportTabletEvent(xiEvent, tabletData);
+ xi2ReportTabletEvent(xiEvent, tabletData);
break;
case XI_PropertyEvent: {
// This is the wacom driver's way of reporting tool proximity.