Code polish, fix potential crash

This commit is contained in:
nathan 2017-07-12 01:29:32 +02:00
parent 2eb8fe7574
commit fd5b8229cb
2 changed files with 3 additions and 7 deletions

View File

@ -450,7 +450,7 @@ class WindowsMenu extends WindowsBaseMenuItem implements MenuPeer {
} }
// close the previous popup menu // close the previous popup menu
User32.IMPL.SendMessage(hWnd, WM_KEYDOWN, new WPARAM(VK_ESCAPE), null); User32.IMPL.SendMessage(hWnd, WM_KEYDOWN, new WPARAM(VK_ESCAPE), new LPARAM(0));
} }
return; return;
@ -459,9 +459,7 @@ class WindowsMenu extends WindowsBaseMenuItem implements MenuPeer {
} }
} }
WPARAM wparam = new WPARAM(0); User32.IMPL.PostMessage(mainHwnd, WM_NULL, new WPARAM(0), new LPARAM(0));
LPARAM lparam = new LPARAM(0);
User32.IMPL.PostMessage(mainHwnd, WM_NULL, wparam, lparam);
} }

View File

@ -122,9 +122,7 @@ class _WindowsNativeTray extends Tray implements NativeUI {
super.remove(); super.remove();
WPARAM wparam = new WPARAM(0); User32.IMPL.PostMessage(WindowsEventDispatch.get(), WM_QUIT, new WPARAM(0), new LPARAM(0));
LPARAM lparam = new LPARAM(0);
User32.IMPL.PostMessage(WindowsEventDispatch.get(), WM_QUIT, wparam, lparam);
} }
}; };