Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions default/hypr/apps/steam.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
13 changes: 13 additions & 0 deletions test/shell.d/steam-proton-focus-test.sh
Original file line number Diff line number Diff line change
@@ -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_*"