fix: leave the PC keyboard's pad handling to #956 and fix the red keyboard test (#1221)

This commit is contained in:
MaxsTechReview authored and GitHub committed 2026-10-20 16:30:51 -04:00
1 parent 746a850a44
commit 8ea48dc039
2 files changed
+6 -4

No files matched your search

@@ -623,7 +623,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
onDispose { com.droiddeck.launcher.glasses.GlassesMenuMirror.setSessionMenuVisible(this@SessionActivity, false) }
}
androidx.compose.runtime.LaunchedEffect(drawerOpen, pcKeyboardOpen, achievementsOpen, pipUi) { updatePointerCapture() }
androidx.compose.runtime.LaunchedEffect(pcKeyboardOpen, AgentGuest.steamKeyboard) { updateOnScreenControls() }
androidx.compose.runtime.LaunchedEffect(AgentGuest.steamKeyboard) { updateOnScreenControls() }
androidx.compose.runtime.LaunchedEffect(picturePosition, SessionState.running, pipUi, cardboard.enabled) { applyGameAlignment() }
DroidDeckTheme {
if (pipUi) {
@@ -2723,7 +2723,7 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
}
private fun keyboardCoversPad() =
SessionState.mode == SessionService.MODE_STEAM && (pcKeyboardOpen || AgentGuest.steamKeyboard)
SessionState.mode == SessionService.MODE_STEAM && AgentGuest.steamKeyboard
private fun sendGuestKey(code: Int, down: Boolean) {
if (down && pipUi) return
@@ -62,13 +62,15 @@ class SessionKeyboardPadTest {
assertEquals(View.VISIBLE, controls.visibility)
}
@Test fun keyboardsLeaveThePadAloneOutsideSteam() {
@Test fun steamsKeyboardLeavesThePadAloneOutsideSteam() {
SessionState.mode = SessionService.MODE_DESKTOP
SessionPrefs.setOscMode(activity, SessionPrefs.OSC_ALWAYS)
steamKeyboard(true)
pcKeyboard(true)
update()
assertEquals(View.VISIBLE, controls.visibility)
pcKeyboard(true)
update()
assertEquals(View.GONE, controls.visibility)
}
@Test fun steamTouchControllerHidesAndHandsTouchBackWhileSteamsKeyboardIsUp() {