Skip to content

Commit 33607da

Browse files
committed
fixed tiny thing
1 parent 416a7ce commit 33607da

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

platform/windows/display_server_windows.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4365,13 +4365,12 @@ void DisplayServerWindows::window_show_system_menu(WindowID p_window) {
43654365
GetCursorPos(&coords);
43664366

43674367
// Retrieve menu identifier for later.
4368-
int menu_ident = TrackPopupMenu(system_menu, WM_CHAR, coords.x, coords.y, 0, wd.hWnd, 0);
4368+
int menu_ident = TrackPopupMenu(system_menu, TPM_LEFTALIGN | TPM_TOPALIGN, coords.x, coords.y, 0, wd.hWnd, 0);
43694369

4370-
if (menu_ident == 0) {
4371-
return;
4370+
if (menu_ident != 0) {
4371+
SendMessage(wd.hWnd, WM_SYSCOMMAND, menu_ident, 0);
43724372
}
43734373

4374-
SendMessage(wd.hWnd, WM_SYSCOMMAND, menu_ident, 0);
43754374
}
43764375

43774376
void DisplayServerWindows::set_context(Context p_context) {

0 commit comments

Comments
 (0)