summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexander Volkov <a.volkov@rusbitech.ru>2015-09-08 17:59:17 +0300
committerAlexander Volkov <a.volkov@rusbitech.ru>2015-09-21 20:12:10 +0000
commita0aad95f5ad1ff044f5e46cf2d3302c42d058f6a (patch)
treebf70f142e802f9c51396a8814728b7c01a2ac4ac /src
parent30c8e845be91bcd3e903ec44f17ad686a7c285a7 (diff)
Set the source for a detached mouse button event
If a mouse event from the window system changes both position and buttons at the same time, then it's split by QGuiApplication into a mouse move event followed by a mouse button event. Propagate the source of the original mouse event to the mouse button event. Change-Id: I075fb4ad9e4338bf8ec170630ce270b38d8682d9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qguiapplication.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index fc87759227..94c831e18c 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -1713,7 +1713,7 @@ void QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::Mo
// should first send a move event followed by a button changed event. Since this is not the case
// with the current event, we split it in two.
QWindowSystemInterfacePrivate::MouseEvent mouseButtonEvent(
- e->window.data(), e->timestamp, e->type, e->localPos, e->globalPos, e->buttons, e->modifiers);
+ e->window.data(), e->timestamp, e->type, e->localPos, e->globalPos, e->buttons, e->modifiers, e->source);
if (e->flags & QWindowSystemInterfacePrivate::WindowSystemEvent::Synthetic)
mouseButtonEvent.flags |= QWindowSystemInterfacePrivate::WindowSystemEvent::Synthetic;
e->buttons = buttons;