system/dbus: buffer xdg-dbus-proxy messages
All checks were successful
test / test (push) Successful in 21s

Pointing xdg-dbus-proxy to stdout/stderr makes a huge mess. This change enables app to neatly print out prefixed xdg-dbus-proxy messages after output is resumed.

Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
This commit is contained in:
2024-11-03 03:07:02 +09:00
parent 8cd3651bb6
commit bfcce3ff75
4 changed files with 55 additions and 6 deletions

View File

@@ -185,6 +185,15 @@ func (a *app) Wait() (int, error) {
// child process exited, resume output
fmsg.Resume()
// print queued up dbus messages
if a.seal.dbusMsg != nil {
a.seal.dbusMsg(func(msgbuf []string) {
for _, msg := range msgbuf {
fmsg.Println(msg)
}
})
}
// close wayland connection
if a.seal.wl != nil {
if err := a.seal.wl.Close(); err != nil {