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 <cat@ophivana.moe>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user