mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-07 23:51:55 -07:00
reset dragged window on failed begin
This commit is contained in:
@@ -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.
|
// 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)) {
|
if (!g_pCompositor->windowValidMapped(DRAGGINGWINDOW)) {
|
||||||
Debug::log(ERR, "Dragging attempted on an invalid window!");
|
Debug::log(ERR, "Dragging attempted on an invalid window!");
|
||||||
|
g_pInputManager->currentlyDraggedWindow = nullptr;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DRAGGINGWINDOW->m_bIsFullscreen) {
|
if (DRAGGINGWINDOW->m_bIsFullscreen) {
|
||||||
Debug::log(LOG, "Rejecting drag on a fullscreen window.");
|
Debug::log(LOG, "Rejecting drag on a fullscreen window.");
|
||||||
|
g_pInputManager->currentlyDraggedWindow = nullptr;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -140,6 +142,7 @@ void IHyprLayout::onBeginDragWindow() {
|
|||||||
|
|
||||||
if (PWORKSPACE->m_bHasFullscreenWindow && (!DRAGGINGWINDOW->m_bCreatedOverFullscreen || !DRAGGINGWINDOW->m_bIsFloating)) {
|
if (PWORKSPACE->m_bHasFullscreenWindow && (!DRAGGINGWINDOW->m_bCreatedOverFullscreen || !DRAGGINGWINDOW->m_bIsFloating)) {
|
||||||
Debug::log(LOG, "Rejecting drag on a fullscreen workspace. (window under fullscreen)");
|
Debug::log(LOG, "Rejecting drag on a fullscreen workspace. (window under fullscreen)");
|
||||||
|
g_pInputManager->currentlyDraggedWindow = nullptr;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user