summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGiulio Camuffo <giulio.camuffo@jollamobile.com>2015-10-29 16:35:27 +0200
committerGiulio Camuffo <giulio.camuffo@jollamobile.com>2015-10-29 15:05:46 +0000
commitbd21beea9a433a8878c0e719a7bfb8c14df47840 (patch)
treefaecab687614385126ceb3f6e3862ef80d8e432e
parentf242587cbf3ee8ade683414aaa95158a1149db4c (diff)
Fix deadlock when starting a drag
With commit c55a36cb9015cf1eebd49eaa5b1b4f4ec9b28451 in qtbase the QSimpleDrag code changed in a way that caused a deadlock due to drawing a window without a role. However, thanks to that we can now remove that start/cancel hack and simplify the code. Change-Id: Icba6e7c9c4927855e48fb21632db1a10332c4ffb Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
-rw-r--r--src/client/qwaylanddnd.cpp14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/client/qwaylanddnd.cpp b/src/client/qwaylanddnd.cpp
index 59f91411f..e195d193a 100644
--- a/src/client/qwaylanddnd.cpp
+++ b/src/client/qwaylanddnd.cpp
@@ -65,21 +65,9 @@ QMimeData * QWaylandDrag::platformDropData()
void QWaylandDrag::startDrag()
{
- bool cancel = false;
- if (!shapedPixmapWindow()) {
- QBasicDrag::startDrag();
- // Don't call cancel() here, since that will hide 'shapedPixmapWindow()', and
- // QWaylandWindow::setVisible(false) will flush the window system queue,
- // ending up trying to render the window, which doesn't have a role yet,
- // and so blocking waiting for a frame callback.
- cancel = true;
- }
-
+ QBasicDrag::startDrag();
QWaylandWindow *icon = static_cast<QWaylandWindow *>(shapedPixmapWindow()->handle());
m_display->currentInputDevice()->dataDevice()->startDrag(drag()->mimeData(), icon);
- if (cancel)
- QBasicDrag::cancel();
- QBasicDrag::startDrag();
}
void QWaylandDrag::cancel()