summaryrefslogtreecommitdiff
path: root/src/helpers/Monitor.hpp
diff options
context:
space:
mode:
authorJohn Mylchreest <jmylchreest@gmail.com>2026-01-08 21:27:00 +0000
committerGitHub <noreply@github.com>2026-01-08 22:27:00 +0100
commit5b1b79c29c5e0ea974b2a9da5d122dd0f3bedca6 (patch)
tree3285d6e97dc25ead427cc541edadb1c1d9e84d7d /src/helpers/Monitor.hpp
parenteb623bd91dfdab468600924aabac51f06d3a8f99 (diff)
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
Diffstat (limited to 'src/helpers/Monitor.hpp')
-rw-r--r--src/helpers/Monitor.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/helpers/Monitor.hpp b/src/helpers/Monitor.hpp
index 98d672e6..339497a5 100644
--- a/src/helpers/Monitor.hpp
+++ b/src/helpers/Monitor.hpp
@@ -327,8 +327,10 @@ class CMonitor {
bool inHDR();
- /// Has an active workspace with a real fullscreen window
- bool inFullscreenMode();
+ /// Has an active workspace with a real fullscreen window (includes special workspace)
+ bool inFullscreenMode();
+ /// Get fullscreen window from active or special workspace
+ PHLWINDOW getFullscreenWindow();
std::optional<NColorManagement::PImageDescription> getFSImageDescription();
bool needsCM();