From 8964a59368225d881045bad756a402a8f632d1fb Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Mon, 2 Aug 2021 14:43:21 +0200 Subject: Allow dragging of a floating dockwidget on macOS with a custom titlebar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This amends 3224c6d7d150164241c13ccf7d47377a39c0a6bb to account for the case when the dockwidget is already floating. Task-number: QTBUG-70137 Change-Id: If8b345565b11b44beb3fb4b697cfe812c29c6396 Reviewed-by: Tor Arne Vestbø (cherry picked from commit ba3e1fe09b7d921985e21d857a1d566465095e69) Reviewed-by: Qt Cherry-pick Bot --- src/widgets/widgets/qdockwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/widgets/qdockwidget.cpp b/src/widgets/widgets/qdockwidget.cpp index b391f278b2..e40112bd14 100644 --- a/src/widgets/widgets/qdockwidget.cpp +++ b/src/widgets/widgets/qdockwidget.cpp @@ -975,7 +975,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 -- cgit v1.2.3