summaryrefslogtreecommitdiff
path: root/src/layout/IHyprLayout.cpp
diff options
context:
space:
mode:
authorvaxerski <vaxry@vaxry.net>2023-01-20 16:30:30 +0100
committervaxerski <vaxry@vaxry.net>2023-01-20 16:30:30 +0100
commitd5913a23acd36eeaa46a99380afe8b2a78492f2e (patch)
tree9ab2dd4a85a0f694428e8472384194af587f9043 /src/layout/IHyprLayout.cpp
parent3436486575043a942d4733a019870713efbabcac (diff)
reset dragged window on failed begin
Diffstat (limited to 'src/layout/IHyprLayout.cpp')
-rw-r--r--src/layout/IHyprLayout.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/layout/IHyprLayout.cpp b/src/layout/IHyprLayout.cpp
index ab3d76b0..39b30bea 100644
--- a/src/layout/IHyprLayout.cpp
+++ b/src/layout/IHyprLayout.cpp
@@ -128,11 +128,13 @@ void IHyprLayout::onBeginDragWindow() {
// Window will be floating. Let's check if it's valid. It should be, but I don't like crashing.
if (!g_pCompositor->windowValidMapped(DRAGGINGWINDOW)) {
Debug::log(ERR, "Dragging attempted on an invalid window!");
+ g_pInputManager->currentlyDraggedWindow = nullptr;
return;
}
if (DRAGGINGWINDOW->m_bIsFullscreen) {
Debug::log(LOG, "Rejecting drag on a fullscreen window.");
+ g_pInputManager->currentlyDraggedWindow = nullptr;
return;
}
@@ -140,6 +142,7 @@ void IHyprLayout::onBeginDragWindow() {
if (PWORKSPACE->m_bHasFullscreenWindow && (!DRAGGINGWINDOW->m_bCreatedOverFullscreen || !DRAGGINGWINDOW->m_bIsFloating)) {
Debug::log(LOG, "Rejecting drag on a fullscreen workspace. (window under fullscreen)");
+ g_pInputManager->currentlyDraggedWindow = nullptr;
return;
}