Skip to content

Commit 4719f7b

Browse files
committed
fix(dbus): Allow replacement when requesting name ownership
1 parent df4a24f commit 4719f7b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

internal/dbus/notifications.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ func (n *notifications) GetServerInformation() (name, vendor, version, specVersi
179179
}
180180

181181
func (n *notifications) init() error {
182-
reply, err := n.conn.RequestName(notificationsName, dbus.NameFlagDoNotQueue)
182+
reply, err := n.conn.RequestName(notificationsName, dbus.NameFlagDoNotQueue|dbus.NameFlagReplaceExisting|dbus.NameFlagAllowReplacement)
183183
if err != nil {
184184
return err
185185
}

internal/dbus/snw.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ func (s *statusNotifierWatcher) init() error {
299299
return err
300300
}
301301

302-
reply, err := s.conn.RequestName(snwName, dbus.NameFlagDoNotQueue)
302+
reply, err := s.conn.RequestName(snwName, dbus.NameFlagDoNotQueue|dbus.NameFlagReplaceExisting|dbus.NameFlagAllowReplacement)
303303
if err != nil {
304304
return err
305305
}

0 commit comments

Comments
 (0)