From 5b1b79c29c5e0ea974b2a9da5d122dd0f3bedca6 Mon Sep 17 00:00:00 2001 From: John Mylchreest Date: Thu, 8 Jan 2026 21:27:00 +0000 Subject: fix: handle fullscreen windows on special workspaces (#12851) * fix: handle fullscreen windows on special workspaces inFullscreenMode() only checked m_activeWorkspace, missing fullscreen windows on special workspaces. This caused crashes and incorrect behavior when fullscreen windows were on special workspaces. Changes: - inFullscreenMode() now checks special workspace first since it renders on top of regular workspaces - Added getFullscreenWindow() helper to safely get fullscreen window from either active or special workspace - Updated callers (shouldSkipScheduleFrameOnMouseEvent, Renderer, getFSImageDescription) to use the new helper - Reset m_aboveFullscreen for layer surfaces when opening, closing, or stealing special workspaces between monitors * test: add special workspace fullscreen detection tests Add tests for the new special workspace fullscreen handling introduced in the previous commit. The tests cover: 1. Fullscreen detection on special workspace - verifies that a window made fullscreen on a special workspace is correctly detected 2. Special workspace fullscreen precedence - verifies that when both regular and special workspaces have fullscreen windows, the special workspace window can be focused when the special workspace is opened 3. Toggle special workspace behavior - verifies that toggling the special workspace off properly hides it and returns focus to the regular workspace's fullscreen window These tests exercise the key code paths modified in the fix: - inFullscreenMode() checking special workspace first - getFullscreenWindow() helper returning correct window - Layer surface m_aboveFullscreen reset on special workspace toggle --- src/render/Renderer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/render/Renderer.cpp') diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 1aa85f15..6a24c0d3 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -1567,7 +1567,7 @@ bool CHyprRenderer::commitPendingAndDoExplicitSync(PHLMONITOR pMonitor) { const bool configuredHDR = (pMonitor->m_cmType == NCMType::CM_HDR_EDID || pMonitor->m_cmType == NCMType::CM_HDR); bool wantHDR = configuredHDR; - const auto FS_WINDOW = pMonitor->inFullscreenMode() ? pMonitor->m_activeWorkspace->getFullscreenWindow() : nullptr; + const auto FS_WINDOW = pMonitor->getFullscreenWindow(); if (pMonitor->supportsHDR()) { // HDR metadata determined by -- cgit v1.2.3