diff options
author | Andy Shaw <andy.shaw@qt.io> | 2021-08-02 14:43:21 +0200 |
---|---|---|
committer | Andy Shaw <andy.shaw@qt.io> | 2021-08-02 14:55:54 +0200 |
commit | ba3e1fe09b7d921985e21d857a1d566465095e69 (patch) | |
tree | 9d30a3a50b6c9da2e403b3fb88597ef100468803 /src/widgets | |
parent | rhi: Be more graceful when one destroys a resource after the QRhi (diff) | |
download | qtbase-ba3e1fe09b7d921985e21d857a1d566465095e69.tar.xz qtbase-ba3e1fe09b7d921985e21d857a1d566465095e69.zip |
Allow dragging of a floating dockwidget on macOS with a custom titlebar
This amends 3224c6d7d150164241c13ccf7d47377a39c0a6bb to account for the
case when the dockwidget is already floating.
Task-number: QTBUG-70137
Pick-to: 6.2 6.1 5.15
Change-Id: If8b345565b11b44beb3fb4b697cfe812c29c6396
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/widgets/qdockwidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/widgets/qdockwidget.cpp b/src/widgets/widgets/qdockwidget.cpp index 4939078870..4080a622f0 100644 --- a/src/widgets/widgets/qdockwidget.cpp +++ b/src/widgets/widgets/qdockwidget.cpp @@ -974,7 +974,7 @@ bool QDockWidgetPrivate::mouseMoveEvent(QMouseEvent *event) > QApplication::startDragDistance()) { #ifdef Q_OS_MACOS - if (windowHandle()) { + if (windowHandle() && !q->isFloating()) { // When using native widgets on mac, we have not yet been successful in // starting a drag on an NSView that belongs to one window (QMainWindow), // but continue the drag on another (QDockWidget). This is what happens if |