diff options
author | Thorbjørn Lund Martsum <tmartsum@gmail.com> | 2022-09-06 11:05:53 +0200 |
---|---|---|
committer | Thorbjørn Lund Martsum <tmartsum@gmail.com> | 2022-09-06 20:35:28 +0200 |
commit | 06556d079afcf8c53c7dbbc0592988f52a23ff68 (patch) | |
tree | 002119c3559020ac57deb4086c3a6bc4ecfd2cb3 /src/widgets/widgets/qdockwidget.cpp | |
parent | 05cc5b3541700572f39cf98f8aeaba50c1342dae (diff) |
Refix QDockwidget drag out dockwidget
In f082458c4609dfa20fdfb8bfe3e625c311b145da a fix attempt was made
and in a lucky example on Mac it worked well. However, the logic was
still not correct and that could be seen in other systems/examples.
This patch updates the logic to be the correct behavior in
general.
Pick-to: 6.4 6.3 6.2 5.15 6.4.0
Fixes: QTBUG-106064
Change-Id: I3b098be9942d37c367b146a7359185bcfd127762
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/widgets/widgets/qdockwidget.cpp')
-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 ff227bcedb..eb6f1d83c1 100644 --- a/src/widgets/widgets/qdockwidget.cpp +++ b/src/widgets/widgets/qdockwidget.cpp @@ -754,7 +754,7 @@ void QDockWidgetPrivate::initDrag(const QPoint &pos, bool nca) state = new QDockWidgetPrivate::DragState; state->pressPos = pos; state->globalPressPos = q->mapToGlobal(pos); - state->widgetInitialPos = q->isFloating() ? q->pos() : q->mapToGlobal(q->pos()); + state->widgetInitialPos = q->isFloating() ? q->pos() : q->mapToGlobal(QPoint(0, 0)); state->dragging = false; state->widgetItem = nullptr; state->ownWidgetItem = false; |