From 157ee01a8d0be9a4dbac03883c9eaf3609fc1172 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Fri, 23 Sep 2016 16:04:13 +0200 Subject: 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 --- src/plugins/platforms/xcb/qxcbwindow.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/plugins/platforms/xcb/qxcbwindow.h') 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 -- cgit v1.2.3