From 227827458868eaa59892d22094eebaa9dd194d4c Mon Sep 17 00:00:00 2001 From: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com> Date: Tue, 6 Oct 2026 14:04:22 -0400 Subject: [PATCH] feat: remove Force game windows fullscreen now that games run on their own Xwayland (#349) --- .../com/droiddeck/launcher/MainActivity.kt | 4 -- .../com/droiddeck/launcher/SessionActivity.kt | 4 -- .../droiddeck/launcher/core/DeviceReport.kt | 1 - .../launcher/session/SessionPrefs.kt | 28 -------------- .../launcher/session/SessionService.kt | 2 - .../launcher/ui/ModeSettingsDialog.kt | 7 ---- .../droiddeck/launcher/ui/SessionOverlay.kt | 8 ---- app/src/main/res/values-es/strings.xml | 3 -- app/src/main/res/values-fr/strings.xml | 3 -- app/src/main/res/values-ja/strings.xml | 3 -- app/src/main/res/values-ko/strings.xml | 3 -- app/src/main/res/values-ru/strings.xml | 3 -- app/src/main/res/values-zh-rCN/strings.xml | 3 -- app/src/main/res/values-zh-rHK/strings.xml | 3 -- app/src/main/res/values-zh-rTW/strings.xml | 3 -- app/src/main/res/values/strings.xml | 7 ---- docs/development/steam-display-scaling.md | 14 +++++++ .../overlay/usr/local/bin/droiddeck-session | 37 +++++-------------- 18 files changed, 23 insertions(+), 113 deletions(-) diff --git a/app/src/main/java/com/droiddeck/launcher/MainActivity.kt b/app/src/main/java/com/droiddeck/launcher/MainActivity.kt index 733bc16a23..e8b9d71f52 100644 --- a/app/src/main/java/com/droiddeck/launcher/MainActivity.kt +++ b/app/src/main/java/com/droiddeck/launcher/MainActivity.kt @@ -155,7 +155,6 @@ class MainActivity : ComponentActivity() { private var showPhantomGate by mutableStateOf(false) private var directAudio by mutableStateOf(false) private var clientDirectAudio by mutableStateOf(false) - private var forceFullscreen by mutableStateOf(false) private var stretch16x9 by mutableStateOf(false) private var launcherFullscreen by mutableStateOf(true) private var animationsEnabled by mutableStateOf(true) @@ -1152,7 +1151,6 @@ class MainActivity : ComponentActivity() { backActionsInverted = backActionsInverted, directAudio = if (mode == SessionService.MODE_STEAM) directAudio else null, clientDirectAudio = clientDirectAudio, - forceFullscreen = if (mode == SessionService.MODE_STEAM) forceFullscreen else null, stretch16x9 = if (mode == SessionService.MODE_STEAM) stretch16x9 else null, mic = if (mode == SessionService.MODE_STEAM) mic else null, renderer = if (mode == SessionService.MODE_DESKTOP) renderer else null, @@ -1213,7 +1211,6 @@ class MainActivity : ComponentActivity() { }, onDirectAudio = { on -> SessionPrefs.setDirectAudio(this, on); directAudio = on }, onClientDirectAudio = { on -> SessionPrefs.setClientDirectAudio(this, on); clientDirectAudio = on }, - onForceFullscreen = { on -> SessionPrefs.setForceFullscreen(this, on); forceFullscreen = on }, onStretch16x9 = { on -> SessionPrefs.setStretch16x9(this, on); stretch16x9 = on }, onMic = { on -> SessionPrefs.setMicEnabled(this, on) @@ -1378,7 +1375,6 @@ class MainActivity : ComponentActivity() { backActionsInverted = SessionPrefs.backActionsInverted(this) directAudio = SessionPrefs.directAudio(this) clientDirectAudio = SessionPrefs.clientDirectAudio(this) - forceFullscreen = SessionPrefs.forceFullscreen(this) stretch16x9 = SessionPrefs.stretch16x9(this) mic = SessionPrefs.micEnabled(this) refreshWifiDiscovery() diff --git a/app/src/main/java/com/droiddeck/launcher/SessionActivity.kt b/app/src/main/java/com/droiddeck/launcher/SessionActivity.kt index 6564d80d6e..1459627793 100644 --- a/app/src/main/java/com/droiddeck/launcher/SessionActivity.kt +++ b/app/src/main/java/com/droiddeck/launcher/SessionActivity.kt @@ -229,7 +229,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { /** The on-screen PC keyboard (ui/PcKeyboard): real key presses, Esc and F1 included. */ private var pcKeyboardOpen by mutableStateOf(false) private var hudOn by mutableStateOf(true) - private var fillScreen by mutableStateOf(true) private var upscaler by mutableStateOf(0) private var upscaleSharpness by mutableStateOf(75) private var effects by mutableStateOf(ScreenEffects.OFF) @@ -501,7 +500,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { isHomeApp = isHomeApp, androidApps = androidApps, hudOn = hudOn, - fillScreen = if (SessionState.mode == SessionService.MODE_STEAM) fillScreen else null, upscaler = upscaler, upscaleSharpness = upscaleSharpness, effects = effects, textureAnisotropy = textureAnisotropy, textureLodBias = textureLodBias, frameGen = frameGen, @@ -513,7 +511,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { secondScreenDisplays = secondScreenDisplays, selectedSecondScreenDisplay = selectedSecondScreenDisplay, onHud = { on -> SessionPrefs.setHudEnabled(this@SessionActivity, on); hudOn = on; hud.refresh() }, - onFillScreen = { on -> SessionPrefs.setForceFullscreen(this@SessionActivity, on); fillScreen = on }, onUpscaler = { m -> SessionPrefs.setUpscaler(this@SessionActivity, m); upscaler = m WaylandCompositor.nativeSetUpscaler(m) @@ -765,7 +762,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { private fun readPrefs() { pipAutoEnter = SessionPrefs.pipAutoEnter(this) hudOn = SessionPrefs.hudEnabled(this) - fillScreen = SessionPrefs.forceFullscreen(this) upscaler = SessionPrefs.upscaler(this) upscaleSharpness = SessionPrefs.upscaleSharpness(this) effects = SessionPrefs.screenEffects(this) diff --git a/app/src/main/java/com/droiddeck/launcher/core/DeviceReport.kt b/app/src/main/java/com/droiddeck/launcher/core/DeviceReport.kt index f6a09cd3c3..d5f9e97961 100644 --- a/app/src/main/java/com/droiddeck/launcher/core/DeviceReport.kt +++ b/app/src/main/java/com/droiddeck/launcher/core/DeviceReport.kt @@ -166,7 +166,6 @@ object DeviceReport { k("proot fast path", SessionPrefs.prootFastPath(context)) k("Guest host name", SessionPrefs.guestHostname(context)) k("DirectAudio for games", SessionPrefs.directAudio(context)) - k("Stretch games to fill", SessionPrefs.forceFullscreen(context)) k("Stretch 16:9 to panel", SessionPrefs.stretch16x9(context)) k("Client audio", if (SessionPrefs.clientDirectAudio(context)) "DirectAudio" else "classic") k("Microphone", SessionPrefs.micEnabled(context)) diff --git a/app/src/main/java/com/droiddeck/launcher/session/SessionPrefs.kt b/app/src/main/java/com/droiddeck/launcher/session/SessionPrefs.kt index 8c0753f744..526e03150c 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/SessionPrefs.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/SessionPrefs.kt @@ -165,40 +165,12 @@ object SessionPrefs { prefs(context).edit().putBoolean("clientDirectAudio", on).apply() } - /** - * Steam only: gamescope makes every game window the size of the screen. A game that resizes - * its own window when it loses focus (FlatOut) otherwise comes back smaller, drawn in a - * corner; a game that sets its own resolution and never looks at its window again (Quake 3) - * instead draws small in the bottom-left of the stretched one. A game whose resolution differs - * from the screen's (DiRT 3 at 1280x720) fights it: it rebuilds its swapchain on every forced - * resize and the picture flickers between its own size and the screen's, often from the first - * menu, before the player can reach its resolution setting. Off unless turned on. - */ - fun forceFullscreen(context: Context): Boolean = prefs(context).getBoolean("forceFullscreen", false) - - fun setForceFullscreen(context: Context, on: Boolean) { - prefs(context).edit().putBoolean("forceFullscreen", on).apply() - writeForceFullscreenFlag(context) - } - fun stretch16x9(context: Context): Boolean = prefs(context).getBoolean("stretch16x9", false) fun setStretch16x9(context: Context, on: Boolean) { prefs(context).edit().putBoolean("stretch16x9", on).apply() } - /** - * The same choice as a file the running session watches, so the drawer can change it live: - * the session hands every change to gamescope, which reads GAMESCOPE_FORCE_WINDOWS_FULLSCREEN - * off its root window whenever it changes. Written again at every session start so a file left - * by an earlier session never disagrees with the setting. - */ - fun writeForceFullscreenFlag(context: Context) { - runCatching { - java.io.File(com.droiddeck.launcher.runtime.LinuxRuntime.rootDir(context), "root/.droiddeck-fill") - .writeText(if (forceFullscreen(context)) "1\n" else "0\n") - } - } /** * DirectAudio for games: their Wine audio driver talks to the relay helper on this side. On diff --git a/app/src/main/java/com/droiddeck/launcher/session/SessionService.kt b/app/src/main/java/com/droiddeck/launcher/session/SessionService.kt index e2e08badf9..1c138f5bd7 100644 --- a/app/src/main/java/com/droiddeck/launcher/session/SessionService.kt +++ b/app/src/main/java/com/droiddeck/launcher/session/SessionService.kt @@ -607,9 +607,7 @@ class SessionService : Service() { if (SessionState.mode == MODE_STEAM) guest.add("BL_MANGOAPP=" + (if (SessionPrefs.mangoapp(this)) "1" else "0")) if (steamHere) guest.add("BL_STEAM_CHANNEL=" + SessionPrefs.steamChannel(this)) if (SessionState.mode == MODE_STEAM) { - guest.add("BL_GAMESCOPE_FORCE_FULLSCREEN=" + (if (SessionPrefs.forceFullscreen(this)) "1" else "0")) guest.add("BL_GAMESCOPE_STRETCH_16X9=" + (if (SessionPrefs.stretch16x9(this)) "1" else "0")) - SessionPrefs.writeForceFullscreenFlag(this) } // Proton's own gate for its xalia helper (its `proton` script reads this, and sets // XALIA_SUPPORTED_ONLY itself otherwise). Skipped by default: under FEX it costs every game diff --git a/app/src/main/java/com/droiddeck/launcher/ui/ModeSettingsDialog.kt b/app/src/main/java/com/droiddeck/launcher/ui/ModeSettingsDialog.kt index 2f7ea2586c..16aaf9fd04 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/ModeSettingsDialog.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/ModeSettingsDialog.kt @@ -74,8 +74,6 @@ class ModeSettings( val forceSsbs: Boolean = false, /** Steam only: SessionPrefs.SYNC_* chosen for Proton games; null outside Steam. */ val syncBackend: String? = null, - /** Steam only: forces game windows fullscreen (null = not a Steam page). */ - val forceFullscreen: Boolean? = null, val stretch16x9: Boolean? = null, /** Steam only: the client branch forced on the command line. */ val steamChannel: String? = null, @@ -135,7 +133,6 @@ class ModeSettingsActions( val onFexPreset: (String) -> Unit = {}, val onForceSsbs: (Boolean) -> Unit = {}, val onSyncBackend: (String) -> Unit = {}, - val onForceFullscreen: (Boolean) -> Unit = {}, val onStretch16x9: (Boolean) -> Unit = {}, val onSteamChannel: (String) -> Unit = {}, val onSteamRepair: () -> Unit = {}, @@ -413,10 +410,6 @@ fun ModeSettingsPage(s: ModeSettings, a: ModeSettingsActions) { } } } - if ((tab == ModeSettingsTab.GAMES || (!steam && tab == ModeSettingsTab.DISPLAY)) && s.forceFullscreen != null) SettingsGroup(stringResource(R.string.display_window_compatibility)) { - ToggleRow(host, "fill", stringResource(R.string.display_force_fullscreen), - stringResource(R.string.display_force_fullscreen_hint), s.forceFullscreen, onChange = a.onForceFullscreen) - } if (steam && tab == ModeSettingsTab.GAMES && s.addedGamesDirs != null) SettingsGroup(stringResource(R.string.mode_added_games)) { for (dir in s.addedGamesDirs) { val n = s.addedGames.count { it.folderPath.startsWith("$dir/") } diff --git a/app/src/main/java/com/droiddeck/launcher/ui/SessionOverlay.kt b/app/src/main/java/com/droiddeck/launcher/ui/SessionOverlay.kt index 3af2dd80da..2278ab02af 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/SessionOverlay.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/SessionOverlay.kt @@ -195,8 +195,6 @@ class DrawerActions( val touchMode: String, val touchAuto: String, val fexPreset: String, - /** Steam only: forces game windows fullscreen, changed live (null = not Steam). */ - val fillScreen: Boolean? = null, val upscaler: Int = 0, val upscaleSharpness: Int = 75, /** The compositor's post chain (gpu/ScreenEffects), changed live. */ @@ -226,7 +224,6 @@ class DrawerActions( val onBackActionsInverted: (Boolean) -> Unit, val onTouch: (String) -> Unit, val onFexPreset: (String) -> Unit, - val onFillScreen: (Boolean) -> Unit = {}, val onUpscaler: (Int) -> Unit = {}, val onUpscaleSharpness: (Int) -> Unit = {}, val onEffects: (ScreenEffects) -> Unit = {}, @@ -407,11 +404,6 @@ internal fun SessionDrawer(open: Boolean, requestedPage: SessionDrawerPage, cont stringResource(R.string.display_sharpness), null, a.upscaleSharpness, 0..100, step = 5, format = { "$it%" }, modifier = focus.track(page, "upscale-sharpness"), onChange = a.onUpscaleSharpness) } - if (a.fillScreen != null) SettingsGroup(stringResource(R.string.display_window_compatibility)) { - ToggleRow(host, "fill", stringResource(R.string.display_force_fullscreen), - stringResource(R.string.display_force_fullscreen_live), a.fillScreen, - chipModifier = focus.track(page, "fill"), onChange = a.onFillScreen) - } } SessionDrawerPage.EFFECTS -> { ScreenEffectsGroup(host, a, advancedEffectsExpanded, diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index f0eff20e57..0b875d026e 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -285,8 +285,6 @@ Inicia %1$s · en %2$s Elegir otro archivo… Por defecto, el .exe con el nombre de la carpeta o, si no, el más grande. - Estirar juegos para llenar la pantalla - Mantiene a pantalla completa los juegos que se redimensionan solos. Desactívalo si un juego se ve pequeño. Se aplica en la próxima sesión. Estirar juegos 16:9 En pantallas más cuadradas que 16:9, estira los juegos para llenar en lugar de mostrar barras. Se aplica en la próxima sesión. Audio @@ -444,7 +442,6 @@ Página anterior Página siguiente HUD de rendimiento - Estirar juegos para llenar Modo de escalado Nitidez del escalado Efectos de pantalla diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index f82c36ad30..2255f73d49 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -279,8 +279,6 @@ Lancer %1$s · dans %2$s Choisir un autre fichier… Utilise par défaut le .exe portant le même nom que le dossier, sinon le .exe le plus volumineux. - Étirer le jeu pour remplir l\'écran - Maintient en plein écran les jeux capables de se redimensionner. Désactivez cette option si le jeu s\'affiche en petit. Prendra effet à la prochaine session. Étirer les jeux 16:9 Sur les écrans dont le rapport d\'aspect est inférieur à 16:9, étire le jeu pour remplir l\'écran au lieu d\'afficher des bandes noires. Prendra effet à la prochaine session. Audio @@ -442,7 +440,6 @@ Page précédente Page suivante HUD de performance - Étirer le jeu pour remplir l\'écran Auto (%1$s) Clavier Clavier PC diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index baddb067ad..b181ddb8ad 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -279,8 +279,6 @@ %1$sを起動 · %2$s内 別のファイルを選択… デフォルトではフォルダと同じ名前の.exeを使用し、ない場合は最大の.exeを使用します。 - ゲームを引き伸ばして画面を埋める - 自身でサイズ変更できるゲームを全画面に保ちます。ゲームが小さく表示される場合はこれをオフにしてください。次回のセッションで有効になります。 16:9ゲームを引き伸ばす アスペクト比が16:9未満の画面で、黒帯を表示する代わりにゲームを引き伸ばして画面を埋めます。次回のセッションで有効になります。 オーディオ @@ -442,7 +440,6 @@ 前のページ 次のページ パフォーマンスHUD - ゲームを引き伸ばして画面を埋める 自動(%1$s) キーボード PCキーボード diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml index 807825b118..62e3ee42f9 100644 --- a/app/src/main/res/values-ko/strings.xml +++ b/app/src/main/res/values-ko/strings.xml @@ -279,8 +279,6 @@ %1$s 실행 · %2$s에 위치 다른 파일 선택… 기본적으로 폴더와 이름이 같은 .exe를 사용하고, 없으면 가장 큰 .exe를 사용합니다. - 게임을 늘려 화면 채우기 - 자체적으로 크기를 조절하는 게임을 전체 화면으로 유지합니다. 게임이 작게 표시되면 이 옵션을 끄세요. 다음 세션에 적용됩니다. 16:9 게임 늘리기 가로세로 비율이 16:9 미만인 화면에서 검은색 여백 대신 게임을 늘려 화면을 채웁니다. 다음 세션에 적용됩니다. 오디오 @@ -442,7 +440,6 @@ 이전 페이지 다음 페이지 성능 HUD - 게임을 늘려 화면 채우기 자동(%1$s) 키보드 PC 키보드 diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 4356a89638..0013f39128 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -279,8 +279,6 @@ Запустить %1$s · в %2$s Выбрать другой файл… По умолчанию используется .exe с именем папки, иначе самый большой .exe. - Растянуть игру на весь экран - Сохраняет полноэкранный режим для игр, поддерживающих изменение размера. Отключите, если игра отображается мелко. Вступит в силу в следующей сессии. Растянуть игры 16:9 На экранах с соотношением сторон менее 16:9 растягивает игру на весь экран вместо черных полос. Вступит в силу в следующей сессии. Аудио @@ -444,7 +442,6 @@ Предыдущая страница Следующая страница HUD производительности - Растянуть игру на весь экран Авто (%1$s) Клавиатура Клавиатура ПК diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index ff123928a4..0143df8d7c 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -301,8 +301,6 @@ 启动 %1$s · 位于 %2$s 选择其他文件… 默认为与文件夹同名的 .exe,否则为最大的那个。 - 拉伸游戏以填满屏幕 - 使会自行缩放的游戏保持全屏。若游戏显示过小,请关闭此项。将在下次会话生效。 拉伸 16:9 比例的游戏 在比 16:9 更方的屏幕上,拉伸游戏填满屏幕而不是显示黑边。将在下次会话生效。 音频 @@ -479,7 +477,6 @@ 上一页 下一页 性能 HUD - 拉伸游戏填满屏幕 缩放模式 缩放锐度 屏幕效果 diff --git a/app/src/main/res/values-zh-rHK/strings.xml b/app/src/main/res/values-zh-rHK/strings.xml index 2ee9ffce31..6dcd11abde 100644 --- a/app/src/main/res/values-zh-rHK/strings.xml +++ b/app/src/main/res/values-zh-rHK/strings.xml @@ -279,8 +279,6 @@ 啟動 %1$s · 位於 %2$s 選擇其他檔案… 默認使用與文件夾同名的 .exe,否則使用最大的 .exe。 - 拉伸遊戲以填滿屏幕 - 讓支持自行調整大小的遊戲保持全屏幕。如果遊戲顯示得很小,請關閉此項。下次會話生效。 拉伸 16:9 遊戲 在寬高比小於 16:9 的屏幕上,將遊戲拉伸以填滿屏幕,而不是顯示黑邊。下次會話生效。 音頻 @@ -442,7 +440,6 @@ 上一頁 下一頁 性能 HUD - 拉伸遊戲以填滿屏幕 自動(%1$s) 鍵盤 電腦鍵盤 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 0f5df100ed..a60d74af75 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -279,8 +279,6 @@ 啟動 %1$s · 位於 %2$s 選擇其他檔案… 預設使用與資料夾同名的 .exe,否則使用最大的 .exe。 - 拉伸遊戲以填滿螢幕 - 讓支援自行調整大小的遊戲保持全螢幕。如果遊戲顯示得很小,請關閉此項。下次工作階段生效。 拉伸 16:9 遊戲 在長寬比小於 16:9 的螢幕上,將遊戲拉伸以填滿螢幕,而不是顯示黑邊。下次工作階段生效。 音訊 @@ -442,7 +440,6 @@ 上一頁 下一頁 效能 HUD - 拉伸遊戲以填滿螢幕 自動(%1$s) 鍵盤 電腦鍵盤 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 4e3d596e37..d55ed8f500 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -329,8 +329,6 @@ Downloaded %1$s download Takes effect the next time the game starts. - Stretch games to fill the screen - Keeps self-resizing games full screen. Turn off if a game shows up small. Applies next session. Stretch 16:9 games On screens squarer than 16:9, stretches games to fill instead of showing bars. Applies next session. Audio @@ -509,7 +507,6 @@ Previous page Next page Performance HUD - Stretch games to fill Scaling mode Scaling sharpness Screen effects @@ -1061,10 +1058,6 @@ FSR, GSR and NIS apply when enlarging the session image. Sharpen only also works without enlargement. Filter sharpness Frame rate - Game window compatibility - Force game windows fullscreen - Makes every game window the size of the screen. Turn on if a game comes back small or in a corner after switching apps; leave off if a game flickers between sizes. Applies live during a session. - Turn on if a game comes back small after switching; off if it flickers. Applies live. %1$s Sets scaling to %2$s. Match screen (%1$d×%2$d) Steam diff --git a/docs/development/steam-display-scaling.md b/docs/development/steam-display-scaling.md index 51371ef503..e24bebf65d 100644 --- a/docs/development/steam-display-scaling.md +++ b/docs/development/steam-display-scaling.md @@ -214,3 +214,17 @@ Still to check by hand: pasting Android text into a game. Force fullscreen is still unsafe without a matching Game Resolution: with the default (native), a game drawing at another size fights it as in run 4. It stays off by default. + +## Force fullscreen removed (`feat/remove-force-fullscreen`) + +With games on their own Xwayland server, FlatOut 2 no longer shrinks under the QAM, which was the +reason "Force game windows fullscreen" existed. What it still did was make any game whose Game +Resolution differs from what it draws fight it (runs 4 and 5). The switch is gone from Steam +settings (Games) and the session drawer (Display), along with its preference, the +`BL_GAMESCOPE_FORCE_FULLSCREEN` flag, the `~/.droiddeck-fill` live watcher and the device report +line. `BL_GAMESCOPE_ARGS=--force-windows-fullscreen` in `Download/droiddeck-env` still passes the +flag for an experiment. + +Device check (Thor): Alan Wake's American Nightmare with its 1280x720 Game Resolution runs on `:1` +at 1280x720 with no `--force-windows-fullscreen` in the session, 2 frame-size changes, no crash +in logcat. The Games tab and the drawer render without the switch. diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-session b/tools/linuxfs/overlay/usr/local/bin/droiddeck-session index 09571069f4..97089d09f5 100755 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-session +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-session @@ -175,9 +175,10 @@ if [ -z "${BL_INSIDE:-}" ]; then # Two Xwayland servers, as SteamOS runs Steam: the client on the first, games on the second # (STEAM_GAME_DISPLAY_0). The client then sizes the games' server to each game's Game Resolution # (GAMESCOPE_XWAYLAND_MODE_CONTROL; native unless one is set), and gamescope scales it to the - # output. With one server the client and its games share the output's size, and a game drawing at - # another size fights --force-windows-fullscreen: the resize storm piled up GPU buffers until the - # low-memory killer ended the session (docs/development/steam-display-scaling.md). + # output. With one server the client and its games share the output's size, so a game's own Game + # Resolution never reaches its display (docs/development/steam-display-scaling.md). The client's + # overlay is also on another server than the game, so opening it no longer takes the game's X + # keyboard focus, which made games like FlatOut shrink their window. # BL_XWAYLAND_COUNT=1 in Download/droiddeck-env goes back to one. if [ "$mode" = steam ] && [ "${BL_XWAYLAND_COUNT:-2}" -gt 1 ]; then args+=(--xwayland-count "${BL_XWAYLAND_COUNT:-2}") @@ -188,12 +189,10 @@ if [ -z "${BL_INSIDE:-}" ]; then # only once it has a controller; until then gamescope's own default made a finger a left-click # mouse, so the Steam interface took taps but would not scroll on a phone with no pad attached. [ "$mode" = steam ] && args+=(--default-touch-mode 4) - # A game that resizes its own window when it loses focus (the Steam menu opening over it) comes - # back smaller, and gamescope draws a window that is not flagged fullscreen at its own size in - # the top-left corner. Forcing every window to the output's size keeps it filling the screen, - # but a game running at a resolution other than the screen's fights it and flickers, so it is - # off unless the app asks for it: BL_GAMESCOPE_FORCE_FULLSCREEN=1 turns it on. - [ "$mode" = steam ] && [ "${BL_GAMESCOPE_FORCE_FULLSCREEN:-0}" = 1 ] && args+=(--force-windows-fullscreen) + # No --force-windows-fullscreen: it was for games that shrink their window when the Steam menu + # opens over them (FlatOut), which no longer happens with the games on their own Xwayland server + # (above), and it made any game drawing at another size than its display fight it. An experiment + # can still pass it with BL_GAMESCOPE_ARGS. # HDR10: the app opened its compositor's colour-management gate for this session (BL_HDR=1); # gamescope then offers HDR to its clients through the same wp_color_manager_v1 it binds on ours. [ "${BL_HDR:-0}" = 1 ] && args+=(--hdr-enabled) @@ -217,7 +216,7 @@ if [ -z "${BL_INSIDE:-}" ]; then fi # gamescope manages X windows: toolkits go through Xwayland, not gamescope's own Wayland socket. -# Root-window requests for the game (fullscreen, restore) go to every display gamescope gave us: +# Root-window requests for the game (restore) go to every display gamescope gave us: # the client's ($DISPLAY) and, with two servers, the games' (STEAM_GAME_DISPLAY_0); gamescope reads # them per server. bl_displays() { @@ -467,24 +466,6 @@ case $mode in # moments later, so the seeder has only that gap to mark the redistributables as already run. # It stamps each prefix it has covered and skips it thereafter, so the extra passes cost # almost nothing. - # The drawer's "Stretch games to fill the screen" works live: the app writes its choice to - # ~/.droiddeck-fill, and each change goes to gamescope as GAMESCOPE_FORCE_WINDOWS_FULLSCREEN on - # the root window, which it watches. What gamescope was started with is where this begins. - # Not on the desktop (BL_DESKTOP): no gamescope there, and the loop would outlive the client. - [ -z "${BL_DESKTOP:-}" ] && ( - last=${BL_GAMESCOPE_FORCE_FULLSCREEN:-0} - while :; do - nap 1 - want= - { read -r want || [ -n "$want" ]; } < "$HOME/.droiddeck-fill" 2>/dev/null || continue - case $want in 0|1) ;; *) continue ;; esac - [ "$want" = "$last" ] && continue - if bl_xprop_set_all GAMESCOPE_FORCE_WINDOWS_FULLSCREEN "$want"; then - echo "== stretch games to fill the screen: $want (live)" - last=$want - fi - done - ) & # With the 16:9 stretch on, the client's own scaler must not undo it: in Deck mode it sets # GAMESCOPE_NEW_SCALING_SCALER to Auto (0), which fits the 16:9 picture with bars and outranks -S. # Auto is put back to Stretch (4); a mode picked in the QAM (Integer, Fit, Fill) is kept.