diff options
author | Błażej Szczygieł <spaz16@wp.pl> | 2016-02-15 20:50:16 +0100 |
---|---|---|
committer | Błażej Szczygieł <spaz16@wp.pl> | 2016-02-18 20:08:07 +0000 |
commit | 78ad8f208d8dbe3575194bb9b97d4e42efdc32d5 (patch) | |
tree | db2907d4b7ac163d5a140868c85767572f6a2560 /src/plugins/platforms | |
parent | 4889269ff0fb37130b332863e82dd7c19564116c (diff) |
xcb: Fix drag and drop between xcb screens
Set the proper screen before creating a shaped pixmap window in
QBasicDrag::startDrag(). Grab mouse again when D&D window is
recreated.
Task-number: QTBUG-51215
Change-Id: I5cb47d3b11672b56d17b32072d84a722bdcdcd9a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbdrag.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbdrag.cpp b/src/plugins/platforms/xcb/qxcbdrag.cpp index 9296a6d141..aa6445d2da 100644 --- a/src/plugins/platforms/xcb/qxcbdrag.cpp +++ b/src/plugins/platforms/xcb/qxcbdrag.cpp @@ -193,6 +193,7 @@ void QXcbDrag::startDrag() XCB_ATOM_ATOM, 32, drag_types.size(), (const void *)drag_types.constData()); setUseCompositing(current_virtual_desktop->compositingActive()); + setScreen(current_virtual_desktop->screens().constFirst()->screen()); QBasicDrag::startDrag(); if (connection()->mouseGrabber() == Q_NULLPTR) shapedPixmapWindow()->setMouseGrabEnabled(true); @@ -322,6 +323,9 @@ void QXcbDrag::move(const QPoint &globalPos) if (virtualDesktop != current_virtual_desktop) { setUseCompositing(virtualDesktop->compositingActive()); recreateShapedPixmapWindow(static_cast<QPlatformScreen*>(screen)->screen(), deviceIndependentPos); + if (connection()->mouseGrabber() == Q_NULLPTR) + shapedPixmapWindow()->setMouseGrabEnabled(true); + current_virtual_desktop = virtualDesktop; } else { QBasicDrag::moveShapedPixmapWindow(deviceIndependentPos); |