From 9eb7972e74934820d9f1cd4eed3eac88de041923 Mon Sep 17 00:00:00 2001 From: Michael Pollind Date: Mon, 18 Oct 2021 20:48:22 -0700 Subject: [PATCH 1/4] bugfix: main window is deactived for tabbed window preventing the use from dragging tabbed windows issue: https://github.com/o3de/o3de/issues/4658 Signed-off-by: Michael Pollind --- .../AzQtComponents/Components/FancyDocking.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp index 7a76781cd7..99fbba065f 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp @@ -2790,10 +2790,12 @@ namespace AzQtComponents // a docking drag operation (e.g. popup dialog for new level), we // should cancel our drag operation because the mouse release event // will be lost since we lost focus - if (m_dropZoneState.dragging()) - { - clearDraggingState(); - } + #if !defined(AZ_PLATFORM_LINUX) + if (m_dropZoneState.dragging()) + { + clearDraggingState(); + } + #endif break; } } From b3c7bf47f2ad2068713d48c1e2804195dd8a634b Mon Sep 17 00:00:00 2001 From: Michael Pollind Date: Wed, 20 Oct 2021 08:52:35 -0700 Subject: [PATCH 2/4] Update Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp Signed-off-by: Michael Pollind mpollind@gmail.com Co-authored-by: Steve Pham <82231385+spham-amzn@users.noreply.github.com> Signed-off-by: Michael Pollind --- .../AzQtComponents/AzQtComponents/Components/FancyDocking.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp index 99fbba065f..9b2cf6c040 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp @@ -2790,7 +2790,7 @@ namespace AzQtComponents // a docking drag operation (e.g. popup dialog for new level), we // should cancel our drag operation because the mouse release event // will be lost since we lost focus - #if !defined(AZ_PLATFORM_LINUX) + #if !defined(Q_OS_LINUX) if (m_dropZoneState.dragging()) { clearDraggingState(); From b42f1b022eb5dd51cc01d893a10e915035a83d10 Mon Sep 17 00:00:00 2001 From: Michael Pollind Date: Sat, 23 Oct 2021 11:01:07 -0700 Subject: [PATCH 3/4] replace with ungrab mouse event instead of deactivate window Signed-off-by: Michael Pollind --- .../AzQtComponents/Components/FancyDocking.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp index 9b2cf6c040..8af6af0513 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp @@ -2785,17 +2785,15 @@ namespace AzQtComponents RepaintFloatingIndicators(); } break; - case QEvent::WindowDeactivate: + case QEvent::UngrabMouse: // If our main window is deactivated while we are in the middle of // a docking drag operation (e.g. popup dialog for new level), we // should cancel our drag operation because the mouse release event // will be lost since we lost focus - #if !defined(Q_OS_LINUX) - if (m_dropZoneState.dragging()) - { - clearDraggingState(); - } - #endif + if (m_dropZoneState.dragging()) + { + clearDraggingState(); + } break; } } From eddb867ddfbff7d77fd3d2119192e5e695532c56 Mon Sep 17 00:00:00 2001 From: Michael Pollind Date: Thu, 28 Oct 2021 20:12:47 -0700 Subject: [PATCH 4/4] bugfix: change event to WindowBlocked for FancyDocking Signed-off-by: Michael Pollind --- .../AzQtComponents/AzQtComponents/Components/FancyDocking.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp index 8af6af0513..b6acd14a83 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp @@ -2785,7 +2785,7 @@ namespace AzQtComponents RepaintFloatingIndicators(); } break; - case QEvent::UngrabMouse: + case QEvent::WindowBlocked: // If our main window is deactivated while we are in the middle of // a docking drag operation (e.g. popup dialog for new level), we // should cancel our drag operation because the mouse release event