aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-11-16 23:04:57 +0000
committerVaxry <[email protected]>2024-11-16 23:05:02 +0000
commitec1e6be00377c26dd25497b1544091b3f643c4bc (patch)
tree4d2f3e605d636df91cdd38d26a27fce8aee66eb7
parent83be2480c45bdead9110fdf137a1cd2f5a203378 (diff)
downloadHyprland-ec1e6be00377c26dd25497b1544091b3f643c4bc.tar.gz
Hyprland-ec1e6be00377c26dd25497b1544091b3f643c4bc.zip
core: guard pmonitor in focuswindow
may be null fixes #8483
-rw-r--r--src/Compositor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index da20c5cf..fbbfd7e7 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -1077,7 +1077,7 @@ void CCompositor::focusWindow(PHLWINDOW pWindow, SP<CWLSurfaceResource> pSurface
PWORKSPACE->rememberPrevWorkspace(m_pLastMonitor->activeWorkspace);
if (PWORKSPACE->m_bIsSpecialWorkspace)
m_pLastMonitor->changeWorkspace(PWORKSPACE, false, true); // if special ws, open on current monitor
- else
+ else if (PMONITOR)
PMONITOR->changeWorkspace(PWORKSPACE, false, true);
// changeworkspace already calls focusWindow
return;
@@ -1088,7 +1088,7 @@ void CCompositor::focusWindow(PHLWINDOW pWindow, SP<CWLSurfaceResource> pSurface
/* If special fallthrough is enabled, this behavior will be disabled, as I have no better idea of nicely tracking which
window focuses are "via keybinds" and which ones aren't. */
- if (PMONITOR->activeSpecialWorkspace && PMONITOR->activeSpecialWorkspace != pWindow->m_pWorkspace && !pWindow->m_bPinned && !*PSPECIALFALLTHROUGH)
+ if (PMONITOR && PMONITOR->activeSpecialWorkspace && PMONITOR->activeSpecialWorkspace != pWindow->m_pWorkspace && !pWindow->m_bPinned && !*PSPECIALFALLTHROUGH)
PMONITOR->setSpecialWorkspace(nullptr);
// we need to make the PLASTWINDOW not equal to m_pLastWindow so that RENDERDATA is correct for an unfocused window