summaryrefslogtreecommitdiff
path: root/src/layout/IHyprLayout.cpp
diff options
context:
space:
mode:
authorChing Pei Yang <59727193+horriblename@users.noreply.github.com>2023-02-18 23:35:31 +0100
committerGitHub <noreply@github.com>2023-02-18 22:35:31 +0000
commitc92e0c05e466f8cbf9c99ddcff969a1b36277248 (patch)
treed461585fc9df2880848378128942403f7990f08e /src/layout/IHyprLayout.cpp
parentb944386ca54cf650d660caac31f065c0211168b1 (diff)
Resize on border (#1347)
Diffstat (limited to 'src/layout/IHyprLayout.cpp')
-rw-r--r--src/layout/IHyprLayout.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/layout/IHyprLayout.cpp b/src/layout/IHyprLayout.cpp
index 888c159c..24e76035 100644
--- a/src/layout/IHyprLayout.cpp
+++ b/src/layout/IHyprLayout.cpp
@@ -195,10 +195,15 @@ void IHyprLayout::onBeginDragWindow() {
void IHyprLayout::onEndDragWindow() {
const auto DRAGGINGWINDOW = g_pInputManager->currentlyDraggedWindow;
- g_pInputManager->unsetCursorImage();
-
- if (!g_pCompositor->windowValidMapped(DRAGGINGWINDOW))
+ if (!g_pCompositor->windowValidMapped(DRAGGINGWINDOW)) {
+ if (DRAGGINGWINDOW) {
+ g_pInputManager->unsetCursorImage();
+ g_pInputManager->currentlyDraggedWindow = nullptr;
+ }
return;
+ }
+
+ g_pInputManager->unsetCursorImage();
g_pInputManager->currentlyDraggedWindow = nullptr;