From 69b8484025af5c43dc081802be36c55a93c4470c Mon Sep 17 00:00:00 2001 From: Marco Allegretti Date: Sat, 25 Apr 2026 09:48:50 +0200 Subject: [PATCH] Hide HUD while a game window is fullscreen A mapped LayerShell surface prevents KWin from using DRM direct scanout for fullscreen windows. Setting showing=false fades out the HUD then sets visible=false, unmapping the Wayland surface and allowing KWin to bypass the compositor render loop entirely for the game frame. The HUD reappears when the game exits or is minimised. Error toasts still work because a failed launch never produces a fullscreen window, so showingWindow remains false. --- containments/homescreens/folio/qml/main.qml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/containments/homescreens/folio/qml/main.qml b/containments/homescreens/folio/qml/main.qml index cfa4b45f..1c8de4f0 100644 --- a/containments/homescreens/folio/qml/main.qml +++ b/containments/homescreens/folio/qml/main.qml @@ -758,11 +758,17 @@ ContainmentItem { // the user return to the Game Center after launching a game. // Keep the Loader active for the full duration of gaming mode so the // opacity Behavior in GamingHUD can animate both fade-in and fade-out. + // + // Hide the HUD while a game window covers the screen. A mapped LayerShell + // surface prevents KWin from using DRM direct scanout for the fullscreen + // game window. Setting showing=false triggers the opacity fade-out and then + // sets visible=false, which unmaps the Wayland surface and lets KWin bypass + // the compositor render loop entirely for the game frame. Loader { active: ShellSettings.Settings.gamingModeEnabled sourceComponent: GamingHUD { visible: showing - showing: !root.gameCenterOpen + showing: !root.gameCenterOpen && !windowMaximizedTracker.showingWindow onOpenRequested: root.gameCenterOpen = true } }