mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-20 05:16:01 +00:00
fix: "DroidDeck isn't responding" on dual-screen handhelds after the bottom screen sits idle (#1917)
The bottom-screen panel handed focus back to the main screen only when it opened or was touched within the last second. When the panel became the active screen later, the paused launcher kept no focused window, so controller input waited until Android reported the app as not responding. The panel now hands focus back whenever it becomes the active screen or gains window focus, unless bottom-screen typing is open or an app the launcher opened is in front.
This commit is contained in:
1 parent
0a07926ef3
commit
bfa61b5139
2 files changed
+4
-23
No files matched your search
@@ -81,13 +81,4 @@ class DualScreenPanelOwnerTest {
|
||||
DualScreenPanel.show(app, 2, 10)
|
||||
assertEquals(10, DualScreenPanel.focusTask(fromPanel = false))
|
||||
}
|
||||
|
||||
@Test fun thePanelTookFocusWhenItJustOpenedOrWasJustTouched() {
|
||||
assertTrue(DualScreenPanel.tookFocus(fresh = true, touchedAt = Long.MIN_VALUE, now = 5_000L))
|
||||
assertTrue(DualScreenPanel.tookFocus(fresh = false, touchedAt = 4_700L, now = 5_000L))
|
||||
assertTrue(DualScreenPanel.tookFocus(fresh = false, touchedAt = 5_000L, now = 5_000L))
|
||||
assertFalse(DualScreenPanel.tookFocus(fresh = false, touchedAt = 3_500L, now = 5_000L))
|
||||
assertFalse(DualScreenPanel.tookFocus(fresh = false, touchedAt = Long.MIN_VALUE, now = 5_000L))
|
||||
assertFalse(DualScreenPanel.tookFocus(fresh = false, touchedAt = 6_000L, now = 5_000L))
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user