summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-05-17 12:56:53 +0200
committerGitHub <noreply@github.com>2022-05-17 12:56:53 +0200
commitccdd85d8e709e27a173fff9bc314cc4e31240d7b (patch)
treee87bab9db5640fff09b42593821b853f6da182b3 /platform
parent129767da7063ffb6a4e0d592d478b51b0be0be1b (diff)
parent47d0dc8a410f9a69f40db6ce0f65b8493a78d3a4 (diff)
Merge pull request #61001 from derammo/derammo_popup_conditional_hide
Diffstat (limited to 'platform')
-rw-r--r--platform/windows/display_server_windows.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp
index 32af329d09..e771057d2e 100644
--- a/platform/windows/display_server_windows.cpp
+++ b/platform/windows/display_server_windows.cpp
@@ -2158,7 +2158,10 @@ void DisplayServerWindows::popup_close(WindowID p_window) {
WindowID win_id = E->get();
popup_list.erase(E);
- _send_window_event(windows[win_id], DisplayServerWindows::WINDOW_EVENT_CLOSE_REQUEST);
+ if (win_id != p_window) {
+ // Only request close on related windows, not this window. We are already processing it.
+ _send_window_event(windows[win_id], DisplayServerWindows::WINDOW_EVENT_CLOSE_REQUEST);
+ }
E = F;
}
}
@@ -2173,6 +2176,7 @@ LRESULT DisplayServerWindows::MouseProc(int code, WPARAM wParam, LPARAM lParam)
case WM_NCRBUTTONDOWN:
case WM_NCMBUTTONDOWN:
case WM_LBUTTONDOWN:
+ case WM_RBUTTONDOWN:
case WM_MBUTTONDOWN: {
MOUSEHOOKSTRUCT *ms = (MOUSEHOOKSTRUCT *)lParam;
Point2i pos = Point2i(ms->pt.x, ms->pt.y);