From 38ef2b4d0caf48a5f6bb9d472b76764cbf14d23d Mon Sep 17 00:00:00 2001 From: Ophestra Umiker Date: Mon, 9 Sep 2024 03:16:54 +0900 Subject: app/dbus: manage dbus proxy and pass address to child This commit adds code that starts and registers the D-Bus proxy, as well as cleanup code that tracks and closes the daemon once our child exits. A few more flags were added to pass D-Bus config to xdg-dbus-proxy. Signed-off-by: Ophestra Umiker --- internal/state/register.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'internal/state/register.go') diff --git a/internal/state/register.go b/internal/state/register.go index ac502ae8..be9ce540 100644 --- a/internal/state/register.go +++ b/internal/state/register.go @@ -1,9 +1,14 @@ package state +import "git.ophivana.moe/cat/fortify/dbus" + var ( cleanupCandidate []string enablements *Enablements xcbActionComplete bool + + dbusProxy *dbus.Proxy + dbusDone *chan struct{} ) func RegisterRevertPath(p string) { @@ -23,3 +28,8 @@ func XcbActionComplete() { } xcbActionComplete = true } + +func RegisterDBus(p *dbus.Proxy, done *chan struct{}) { + dbusProxy = p + dbusDone = done +} -- cgit v1.3.1