Skip to content

Commit

Permalink
Don't allow (darwin) DBus to hang our app
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Mar 22, 2021
1 parent d35bfa9 commit e2795d4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions wm/notifications.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,16 @@ func (n *notifications) GetCapabilities() []string {
return []string{"body", "icon-static", "persistence"}
}

func startNotifications() *notifications {
n := &notifications{}
func (n *notifications) register() {
err := RegisterService(n, "/org/freedesktop/Notifications", "org.freedesktop.Notifications")
if err != nil {
fyne.LogError("Could not start DBus notifications server, using local only", err)
}
}

func startNotifications() *notifications {
n := &notifications{}
go n.register()

return n
}

0 comments on commit e2795d4

Please sign in to comment.