mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-18 20:36:04 +00:00
Fix automatic Picture in Picture after session handoffs (#195)
Preserve session readiness for automatic picture in picture
This commit is contained in:
1 parent
c176a0d6fa
commit
6b34c57c15
3 files changed
+12
-5
No files matched your search
@@ -907,7 +907,6 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback {
|
||||
// whole process, so the second Play after a session ended used to re-attach the Surface,
|
||||
// start nothing, and leave the loading panel counting up over a dead session.
|
||||
if (!SessionState.running) {
|
||||
CompositorHost.newSession()
|
||||
SessionEvents.transition(SessionPhase.STARTING_GUEST, "guest.starting")
|
||||
SessionService.start(
|
||||
this, intent.getStringExtra(SessionService.EXTRA_MODE) ?: SessionService.MODE_STEAM,
|
||||
|
||||
@@ -217,6 +217,9 @@ class SessionService : Service() {
|
||||
SessionState.firstFrameSeen = false
|
||||
SessionState.guestPid = -1
|
||||
SessionEvents.transition(SessionPhase.STARTING_GUEST, "service.started", mapOf("mode" to SessionState.mode))
|
||||
// Re-arm after clearing readiness: a retained picture can present between the activity's
|
||||
// start request and this callback, and that notice must not be erased by the reset above.
|
||||
com.droiddeck.launcher.wayland.CompositorHost.newSession()
|
||||
// This session's number, claimed here and not when its process starts: the session it
|
||||
// replaces can report its own exit in the gap between the two, and that exit must not
|
||||
// be taken as this one's.
|
||||
|
||||
Reference in new issue
Block a user