summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbwindow.cpp
diff options
context:
space:
mode:
authorPovilas Kanapickas <povilas@radix.lt>2021-09-28 20:17:01 +0300
committerShawn Rutledge <shawn.rutledge@qt.io>2021-11-15 15:51:14 +0000
commit9879d41d05b681bc41bbc97a66b03a04363fd44c (patch)
tree9ad766367582c8027e5bc5ac24904c477ee6b713 /src/plugins/platforms/xcb/qxcbwindow.cpp
parenta0e7fbd4d54ddbea5c2b155b0f828df3ce3c98fb (diff)
xcb: Implement support for touchpad gestures
They map to the data exposed by libinput exactly the same way as touchpad gestures on Wayland. The implementation is functionally the same and follows the same patterns to preserve similar behavior across X11 and Wayland. For example, we use the last known pointer position as the position for gestures, even though on X11 this data is available as part of events. The new implementation is only enabled if the used xcb supports the required APIs. [ChangeLog][Platform Specific Changes][X11] Touchpads can now detect multi-finger gestures and send RotateNativeGesture, ZoomNativeGesture and PanNativeGesture events, since XInput 2.4 and X Server 21.1. Change-Id: If404dcf8385210deadeb7e7c6d29171e9abc9e50 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbwindow.cpp')
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 7b1072deb3..9d05b9ed4e 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -2147,6 +2147,7 @@ void QXcbWindow::handleMouseEvent(xcb_timestamp_t time, const QPoint &local, con
Qt::KeyboardModifiers modifiers, QEvent::Type type, Qt::MouseEventSource source)
{
m_lastPointerPosition = local;
+ m_lastPointerGlobalPosition = global;
connection()->setTime(time);
Qt::MouseButton button = type == QEvent::MouseMove ? Qt::NoButton : connection()->button();
QWindowSystemInterface::handleMouseEvent(window(), time, local, global,