dbus: emit SessionCreated for restored sessions in WatchExisting

During startup, session.NewManager restores sessions and fires the
OnSessionCreated callback, but dbusAdapter is still nil at that point
so SessionCreated signals were never emitted. WatchExisting runs after
the adapter is live — emit SessionCreated there so GUI clients learn
about pre-existing sessions reliably.
This commit is contained in:
Levi Neely 2026-07-19 14:16:10 +02:00
parent 8fa630f65c
commit eaa32cd94d
1 changed files with 3 additions and 0 deletions

View File

@ -78,6 +78,9 @@ func (a *DBusAdapter) WatchExisting() {
continue
}
a.startWatcher(id, sess)
// Emit SessionCreated so GUI clients that connected before restore
// (via serviceRegistered) learn about pre-existing sessions.
a.conn.Emit(busPath, busIface+".SessionCreated", id)
}
}