Files
DroidDeck/tools/gamescope/patches/0002-steamcompmgr-fallback-appid-focus.patch
T
The412Banner 687b882983 gamescope: a build of the runtime's 3.16.29 with Armada's ARM64 client fixes and a realtime-queue switch, from Arch's own package in CI
Four of Armada's patches apply to 3.16.29 as they are (appid-focus fallback, ARM64 night mode,
ARM64 colour-temperature slider, P3 red); two more are ported by hand: realtime-priority Vulkan
queues on GAMESCOPE_FORCE_VULKAN_REALTIME=1 without CAP_SYS_NICE, and the gamepad cursor sprite
following the X pointer. build-gamescope.yml builds Arch Linux ARM's package with them in an
Arch container, checks every NEEDED library against the runtime's own list, and publishes the
binary as a release asset for the apk to stage over /usr/local/bin/gamescope.
2026-09-23 09:12:15 -04:00

37 lines
1.1 KiB
Diff

From: virtudude <virtudude@protonmail.com>
Subject: [PATCH] steamcompmgr: fallback focus to GAMESCOPE_FALLBACK_APPID
When no baselayer window is focusable, show the window whose appid equals
$GAMESCOPE_FALLBACK_APPID (a boot splash / loading screen opting in via its
STEAM_GAME atom). Yields to the real window as soon as one appears. Focus
selection only, off the per-frame composite path.
diff --git a/src/steamcompmgr.cpp b/src/steamcompmgr.cpp
index 231e245a..2054a092 100644
--- a/src/steamcompmgr.cpp
+++ b/src/steamcompmgr.cpp
@@ -4251,6 +4251,23 @@ pick_primary_focus_and_override(
found:;
}
+ static const uint32_t s_fallbackAppID = []() {
+ const char *e = getenv( "GAMESCOPE_FALLBACK_APPID" );
+ return e ? (uint32_t)strtoul( e, nullptr, 0 ) : 0u;
+ }();
+ if ( !focus && s_fallbackAppID )
+ {
+ for ( steamcompmgr_win_t *fallback_window : vecPossibleFocusWindows )
+ {
+ if ( fallback_window->appID == s_fallbackAppID )
+ {
+ focus = fallback_window;
+ localGameFocused = true;
+ break;
+ }
+ }
+ }
+
if ( !focus && ( !globalFocus || !controlledFocus ) )
{
if ( !vecPossibleFocusWindows.empty() )