mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 14:45:49 +01:00
[v3 windows] Support systray.Destroy()
This commit is contained in:
parent
df0969d1c6
commit
ff218e5323
1 changed files with 9 additions and 0 deletions
|
|
@ -247,4 +247,13 @@ func (s *windowsSystemTray) setIconPosition(position int) {
|
|||
}
|
||||
|
||||
func (s *windowsSystemTray) destroy() {
|
||||
// Remove and delete the system tray
|
||||
getNativeApplication().unregisterSystemTray(s)
|
||||
s.menu.Destroy()
|
||||
w32.DestroyWindow(s.hwnd)
|
||||
// Destroy the notification icon
|
||||
nid := s.newNotifyIconData()
|
||||
if !w32.ShellNotifyIcon(w32.NIM_DELETE, &nid) {
|
||||
globalApplication.info(syscall.GetLastError().Error())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue