From 0b3da1907d46a03e8838c4086b23d48ba69c8776 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C5=82a=C5=BCej=20Szczygie=C5=82?= Date: Sun, 18 Oct 2015 00:16:15 +0200 Subject: xcb: fix drag and drop when window is hidden This patch fixes drag and drop operation on XCB platform when window will be hidden. The window can be hidden during dnd operation by switching virtual desktops or by minimizing all windows (show desktop) using key shortcut. The ShapedPixmapWindow must grab mouse before dnd operation if mouse is not grabbed by other window (like in Qt4). Task-number: QTBUG-46243 Change-Id: I807bc842719a2d0ea0f4dcb733c06c1fd08813e1 Reviewed-by: Shawn Rutledge --- src/plugins/platforms/xcb/qxcbdrag.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/plugins/platforms/xcb/qxcbdrag.cpp') diff --git a/src/plugins/platforms/xcb/qxcbdrag.cpp b/src/plugins/platforms/xcb/qxcbdrag.cpp index d19ea241f1..9296a6d141 100644 --- a/src/plugins/platforms/xcb/qxcbdrag.cpp +++ b/src/plugins/platforms/xcb/qxcbdrag.cpp @@ -194,6 +194,8 @@ void QXcbDrag::startDrag() setUseCompositing(current_virtual_desktop->compositingActive()); QBasicDrag::startDrag(); + if (connection()->mouseGrabber() == Q_NULLPTR) + shapedPixmapWindow()->setMouseGrabEnabled(true); } void QXcbDrag::endDrag() -- cgit v1.2.3