fix: user apps open at the Desktop's resolution (#1172)

A user app (script, AppImage or Flatpak) started from its shortcut runs in
a Run session, which took the Steam resolution (720p by default). It
ignored the resolution chosen under Open Desktop and was letterboxed at
1280x720 on screens that are not 16:9.

User apps now use the Desktop's resolution once one has been chosen. Until
then, and for every other Run program, nothing changes.
This commit is contained in:
MaxsTechReview authored and GitHub committed 2026-10-19 21:27:06 -04:00
1 parent 80a62cd0f0
commit af4f0a7edb
4 files changed
+27 -3

No files matched your search

@@ -40,6 +40,19 @@ class SessionScalingPrefsTest {
assertEquals("800x600", SessionPrefs.resolutionChoice(context, "lxqt", 1440 to 1080))
}
@Test fun userAppsTakeTheDesktopResolutionOnceItIsChosen() {
val context = RuntimeEnvironment.getApplication()
val script = com.droiddeck.launcher.runtime.UserApps.SCRIPT_LAUNCHER
assertEquals("steam", SessionPrefs.displayMode(context, "run", script))
SessionPrefs.setResolutionChoice(context, "lxqt", SessionDisplay.MATCH_SCREEN)
assertEquals("lxqt", SessionPrefs.displayMode(context, "run", script))
assertEquals("lxqt", SessionPrefs.displayMode(context, "run", com.droiddeck.launcher.runtime.AppImageManager.LAUNCHER))
val choice = SessionPrefs.resolutionChoice(context, SessionPrefs.displayMode(context, "run", script), 1240 to 1080)
assertEquals(1240 to 1080, SessionDisplay.resolveChoice(1240 to 1080, choice))
assertEquals("steam", SessionPrefs.displayMode(context, "run", "/usr/bin/retroarch"))
assertEquals("steam", SessionPrefs.displayMode(context, "steam", script))
}
@Test fun freshSettingsUseTheConcreteDefaultAndCustomSizesAreNormalized() {
val context = RuntimeEnvironment.getApplication()
assertEquals(SessionDisplay.DEFAULT_RESOLUTION, SessionPrefs.resolutionChoice(context, "steam", 2400 to 1080))