diff options
author | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2016-09-15 23:21:15 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@qt.io> | 2016-09-16 11:49:12 +0000 |
commit | 2c48695f04b0f4b3b11ec037b13132b146cad082 (patch) | |
tree | 5ed29859635d2fc4164a901b3bc26ef868bee3b2 /src/plugins/platforms | |
parent | 47d064e905de29153d3930dfbbe9b07cd2aa0e05 (diff) | |
download | qtbase-2c48695f04b0f4b3b11ec037b13132b146cad082.tar.gz |
XCB Drop from external app: fix keyboard modifier state
Fix inspired by Qt 4 sources. When we get drop events that are not
coming from the same application, it's unlikely that the keyboard
modifiers are in a sensible state (the usual XCB events are not sent
during drag and drop), so set the keyboard modifier state explicitly.
Task-number: QTBUG-49645
Change-Id: I9360f2b7ffeaa5243a4dfe7ccf96df134c5d2156
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbdrag.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbdrag.cpp b/src/plugins/platforms/xcb/qxcbdrag.cpp index f93e420bcf..acfb580b94 100644 --- a/src/plugins/platforms/xcb/qxcbdrag.cpp +++ b/src/plugins/platforms/xcb/qxcbdrag.cpp @@ -960,6 +960,9 @@ void QXcbDrag::handleDrop(QPlatformWindow *, const xcb_client_message_event_t *e } else { dropData = platformDropData(); supported_drop_actions = accepted_drop_action; + + // Drop coming from another app? Update keyboard modifiers. + QGuiApplicationPrivate::modifier_buttons = QGuiApplication::queryKeyboardModifiers(); } if (!dropData) |