diff options
author | Gatis Paeglis <gatis.paeglis@digia.com> | 2012-10-11 15:29:40 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-22 22:57:51 +0100 |
commit | c8c1604e881920cd6130dd642d0cace77dd4cbe5 (patch) | |
tree | cd06224f89189d407af5a9904e99049c1ef020e9 /src/plugins/platforms/xcb | |
parent | dccd784edfc234802391956062ba395769ff35e1 (diff) |
Fix drops from external sources.
Task-number: QTBUG-26832
Change-Id: Ia1ccce391178e73d26a4f09955bce6c37616384f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/plugins/platforms/xcb')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbdrag.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/plugins/platforms/xcb/qxcbdrag.cpp b/src/plugins/platforms/xcb/qxcbdrag.cpp index cd7237e4b4..1842309b17 100644 --- a/src/plugins/platforms/xcb/qxcbdrag.cpp +++ b/src/plugins/platforms/xcb/qxcbdrag.cpp @@ -763,6 +763,8 @@ void QXcbDrag::handle_xdnd_position(QWindow *w, const xcb_client_message_event_t response.data.data32[3] = 0; // w, h response.data.data32[4] = toXdndAction(qt_response.acceptedAction()); // action + accepted_drop_action = qt_response.acceptedAction(); + if (answerRect.left() < 0) answerRect.setLeft(0); if (answerRect.right() > 4096) @@ -776,8 +778,6 @@ void QXcbDrag::handle_xdnd_position(QWindow *w, const xcb_client_message_event_t if (answerRect.height() < 0) answerRect.setHeight(0); - response.data.data32[4] = toXdndAction(qt_response.acceptedAction()); - // reset target_time = XCB_CURRENT_TIME; @@ -948,15 +948,14 @@ void QXcbDrag::handleDrop(QWindow *, const xcb_client_message_event_t *event) if (l[2] != 0) target_time = /*X11->userTime =*/ l[2]; - // this could be a same-application drop, just proxied due to - // some XEMBEDding, so try to find the real QMimeData used - // based on the timestamp for this drop. - Qt::DropActions supported_drop_actions(l[4]); + Qt::DropActions supported_drop_actions; QMimeData *dropData = 0; if (currentDrag()) { dropData = currentDrag()->mimeData(); + supported_drop_actions = Qt::DropActions(l[4]); } else { dropData = platformDropData(); + supported_drop_actions = accepted_drop_action; } if (!dropData) |