diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2016-09-23 16:04:13 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2016-09-29 16:26:37 +0000 |
commit | 157ee01a8d0be9a4dbac03883c9eaf3609fc1172 (patch) | |
tree | c9fa3b4fdace1f6a93d1a32b6c6b062f599d2696 /src/plugins/platforms/xcb/qxcbwindow.h | |
parent | 75aea3ff5eec4a5c8f4184e14a90f4a5e3a577b0 (diff) |
xcb: when using XI2 for mouse, change state only on press and release
If the mouse event is synthesized from a touchscreen, since we're
using XI2 we've already delivered the actual touch event by the time
an XI_Motion event occurs. It's bogus to treat the XI_Motion event
as a mouse press merely because XIMaskIsSet pretends that the mouse
button is pressed. If the QPA motion event says that the button
is pressed, then QGuiApplicationPrivate::processMouseEvent() will
synthesize an extra mouse button event for the press, and another
for the release.
Task-number: QTBUG-56156
Change-Id: I937edfd8cc9aab5b21370036c4b42dc0c0a74b50
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbwindow.h')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbwindow.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbwindow.h b/src/plugins/platforms/xcb/qxcbwindow.h index f62938ba8a..41dccbe4af 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.h +++ b/src/plugins/platforms/xcb/qxcbwindow.h @@ -139,6 +139,7 @@ public: void handleFocusOutEvent(const xcb_focus_out_event_t *event) Q_DECL_OVERRIDE; void handlePropertyNotifyEvent(const xcb_property_notify_event_t *event) Q_DECL_OVERRIDE; #ifdef XCB_USE_XINPUT22 + void handleXIMouseButtonState(const xcb_ge_event_t *); void handleXIMouseEvent(xcb_ge_event_t *, Qt::MouseEventSource source = Qt::MouseEventNotSynthesized) Q_DECL_OVERRIDE; void handleXIEnterLeave(xcb_ge_event_t *) Q_DECL_OVERRIDE; #endif |