Skip to content

Commit

Permalink
Fix to remove systray id from Windows and macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Nov 27, 2023
1 parent a7e018f commit 1580bb0
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions internal/driver/glfw/driver_desktop.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,16 @@ func (d *gLDriver) SetSystemTrayMenu(m *fyne.Menu) {
d.SetSystemTrayIcon(theme.BrokenImageIcon())
}

app := fyne.CurrentApp()
title := app.Metadata().Name
if title == "" {
title = app.UniqueID()
// Some XDG systray crash without a title (See #3678)
if runtime.GOOS == "linux" || runtime.GOOS == "openbsd" || runtime.GOOS == "freebsd" || runtime.GOOS == "netbsd" {
app := fyne.CurrentApp()
title := app.Metadata().Name
if title == "" {
title = app.UniqueID()
}

systray.SetTitle(title)
}
systray.SetTitle(title)

// it must be refreshed after init, so an earlier call would have been ineffective
d.refreshSystray(m)
Expand Down

0 comments on commit 1580bb0

Please sign in to comment.