mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
[v3 windows] Support systray.Destroy()
This commit is contained in:
@@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user