diff options
author | Giulio Camuffo <giulio.camuffo@jollamobile.com> | 2015-01-29 21:10:25 +0200 |
---|---|---|
committer | Giulio Camuffo <giulio.camuffo@jollamobile.com> | 2015-01-29 19:18:46 +0000 |
commit | f074784e6d45fd0c41ad4a5e10a932201609417c (patch) | |
tree | b15b29be5f30b7f6d71641c17164a99f51ab8267 | |
parent | 5925b7da219738cc40b8c7b6aaa8f28c2883f5be (diff) | |
download | qtwayland-f074784e6d45fd0c41ad4a5e10a932201609417c.tar.gz |
Send mouse events with the correct modifiers
Change-Id: I33da2681bc2315b3dc7de16fa80c45e26a478caa
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
-rw-r--r-- | src/client/qwaylandinputdevice.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp index 39d1705c..30bc6029 100644 --- a/src/client/qwaylandinputdevice.cpp +++ b/src/client/qwaylandinputdevice.cpp @@ -419,7 +419,7 @@ void QWaylandInputDevice::Pointer::pointer_enter(uint32_t serial, struct wl_surf QWaylandWindow *grab = QWaylandWindow::mouseGrab(); if (!grab) { window->handleMouseEnter(mParent); - window->handleMouse(mParent, mParent->mTime, mSurfacePos, mGlobalPos, mButtons, Qt::NoModifier); + window->handleMouse(mParent, mParent->mTime, mSurfacePos, mGlobalPos, mButtons, mParent->modifiers()); } } @@ -468,9 +468,9 @@ void QWaylandInputDevice::Pointer::pointer_motion(uint32_t time, wl_fixed_t surf // so we just set it outside of the window boundaries. pos = QPointF(-1, -1); global = grab->window()->mapToGlobal(pos.toPoint()); - grab->handleMouse(mParent, time, pos, global, mButtons, Qt::NoModifier); + grab->handleMouse(mParent, time, pos, global, mButtons, mParent->modifiers()); } else - window->handleMouse(mParent, time, mSurfacePos, mGlobalPos, mButtons, Qt::NoModifier); + window->handleMouse(mParent, time, mSurfacePos, mGlobalPos, mButtons, mParent->modifiers()); } void QWaylandInputDevice::Pointer::pointer_button(uint32_t serial, uint32_t time, @@ -514,9 +514,9 @@ void QWaylandInputDevice::Pointer::pointer_button(uint32_t serial, uint32_t time if (grab && grab != mFocus) { QPointF pos = QPointF(-1, -1); QPointF global = grab->window()->mapToGlobal(pos.toPoint()); - grab->handleMouse(mParent, time, pos, global, mButtons, Qt::NoModifier); + grab->handleMouse(mParent, time, pos, global, mButtons, mParent->modifiers()); } else if (window) - window->handleMouse(mParent, time, mSurfacePos, mGlobalPos, mButtons, Qt::NoModifier); + window->handleMouse(mParent, time, mSurfacePos, mGlobalPos, mButtons, mParent->modifiers()); } void QWaylandInputDevice::Pointer::pointer_axis(uint32_t time, uint32_t axis, int32_t value) |