From 87267758ac4cbf129eb84264f4d644c51357969a Mon Sep 17 00:00:00 2001 From: stffabi Date: Sun, 7 May 2023 22:17:33 +0200 Subject: [PATCH] [v3 windows] Fix wndproc default case with WMMessageToString --- v3/pkg/application/systemtray_windows.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/v3/pkg/application/systemtray_windows.go b/v3/pkg/application/systemtray_windows.go index a391b288f..87f538646 100644 --- a/v3/pkg/application/systemtray_windows.go +++ b/v3/pkg/application/systemtray_windows.go @@ -173,8 +173,8 @@ func (s *windowsSystemTray) destroy() { func (s *windowsSystemTray) wndProc(msg uint32, wParam, lParam uintptr) uintptr { switch msg { case WM_USER_SYSTRAY: - lparam := w32.LOWORD(uint32(lParam)) - switch lparam { + msg := (lParam & 0xffff) + switch msg { case w32.WM_LBUTTONUP: if s.parent.leftButtonClickHandler != nil { s.parent.leftButtonClickHandler() @@ -192,7 +192,7 @@ func (s *windowsSystemTray) wndProc(msg uint32, wParam, lParam uintptr) uintptr s.parent.rightButtonDoubleClickHandler() } default: - println(w32.WMMessageToString(lParam)) + println(w32.WMMessageToString(msg)) } // TODO: Menu processing //case w32.WM_COMMAND: