From be8695777c6bdca3552401cf73fa7fa72144b5a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Sto=C5=A1i=C4=87?= Date: Fri, 28 Aug 2020 13:54:59 +0200 Subject: [PATCH] Fixed a stack overflow (#6212) Credits to @gurnec for proposing the fix. --- src/modules/fancyzones/lib/WindowMoveHandler.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/modules/fancyzones/lib/WindowMoveHandler.cpp b/src/modules/fancyzones/lib/WindowMoveHandler.cpp index f39b8af2b2..00c90a7798 100644 --- a/src/modules/fancyzones/lib/WindowMoveHandler.cpp +++ b/src/modules/fancyzones/lib/WindowMoveHandler.cpp @@ -291,7 +291,13 @@ void WindowMoveHandlerPrivate::MoveSizeUpdate(HMONITOR monitor, POINT const& ptS // We'll get here if the user presses/releases shift while dragging. // Restart the drag on the ZoneWindow that m_windowMoveSize is on MoveSizeStart(m_windowMoveSize, monitor, ptScreen, zoneWindowMap); - MoveSizeUpdate(monitor, ptScreen, zoneWindowMap); + + // m_dragEnabled could get set to false if we're moving an elevated window. + // In that case do not proceed. + if (m_dragEnabled) + { + MoveSizeUpdate(monitor, ptScreen, zoneWindowMap); + } } }