mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-20 13:26:02 +00:00
Start a session on every Play, not only on the compositor's first start
The compositor lives for the whole process, so the second Play after a session had ended re-attached the Surface, started nothing, and left the loading panel counting up over a dead session — it looked like a login that never came. The service now starts whenever no session is running; the compositor's one-shot first-frame notice is re-armed for the new session, or the panel would never leave; and whatever the previous session left behind (gamescopereaper, the session script, a dead client's helpers, the audio server) is killed first, since it is our uid and still holds the socket the new one needs.
This commit is contained in:
1 parent
ebae834e36
commit
d46bd4a0c3
6 files changed
+63
-4
No files matched your search
@@ -1805,6 +1805,12 @@ int vkp_surface_rotation_degrees(void) {
|
||||
|
||||
ANativeWindow *vkp_window(void) { return g_window; }
|
||||
|
||||
/* A new session under a compositor that has already presented: arm the one-shot again so the
|
||||
* next drawn frame reports, or the app would show its loading panel over the new client for good. */
|
||||
void vkp_reset_first_frame(void) {
|
||||
g_first_frame_done = 0;
|
||||
}
|
||||
|
||||
void vkp_signal_first_frame(void) {
|
||||
if (g_first_frame_done) return;
|
||||
g_first_frame_done = 1;
|
||||
|
||||
@@ -346,6 +346,13 @@ Java_com_steamdeck_launcher_wayland_WaylandCompositor_nativeSetOutputRefreshRate
|
||||
}
|
||||
|
||||
/* The container's screen size for the advertised wl_output mode. Set before the compositor starts. */
|
||||
extern void vkp_reset_first_frame(void);
|
||||
JNIEXPORT void JNICALL
|
||||
Java_com_steamdeck_launcher_wayland_WaylandCompositor_nativeResetFirstFrame(JNIEnv *env, jclass clazz) {
|
||||
(void)env; (void)clazz;
|
||||
vkp_reset_first_frame();
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_com_steamdeck_launcher_wayland_WaylandCompositor_nativeSetOutputSize(JNIEnv *env, jclass clazz, jint w, jint h) {
|
||||
g_output_w = w > 0 ? w : 0;
|
||||
|
||||
Reference in new issue
Block a user