diff --git a/default/hypr/apps/steam.lua b/default/hypr/apps/steam.lua index 152aff64c2fb..57af2f442e89 100644 --- a/default/hypr/apps/steam.lua +++ b/default/hypr/apps/steam.lua @@ -2,3 +2,9 @@ o.window("steam", { float = true, idle_inhibit = "fullscreen" }) o.window({ class = "steam", title = "Steam" }, { center = true, size = { 1100, 700 } }) o.window("steam.*", { tag = "-default-opacity", opacity = "1 1" }) o.window({ class = "steam", title = "Friends List" }, { size = { 460, 800 } }) + +-- Fullscreen Proton games share class steam_app_*. With +-- misc.on_focus_under_fullscreen = 1, a tiled window on the same workspace can +-- take the keyboard while the mouse stays with the game (#13281). Keep focus on +-- the fullscreen client the same way DaVinci Resolve does. +o.window({ class = "^steam_app_", fullscreen = true }, { stay_focused = true }) diff --git a/test/shell.d/steam-proton-focus-test.sh b/test/shell.d/steam-proton-focus-test.sh new file mode 100755 index 000000000000..19428b100668 --- /dev/null +++ b/test/shell.d/steam-proton-focus-test.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -euo pipefail + +source "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)/base-test.sh" + +steam_rules="$ROOT/default/hypr/apps/steam.lua" + +rg -q 'class = "\^steam_app_", fullscreen = true' "$steam_rules" || + fail "fullscreen Proton games match steam_app_* clients" +rg -q 'stay_focused = true' "$steam_rules" || + fail "fullscreen Proton games keep keyboard focus" +pass "fullscreen Proton games keep keyboard focus under steam_app_*"