From b42f1b022eb5dd51cc01d893a10e915035a83d10 Mon Sep 17 00:00:00 2001 From: Michael Pollind Date: Sat, 23 Oct 2021 11:01:07 -0700 Subject: [PATCH] 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; } }