summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-02-03 06:24:05 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-02-03 06:24:05 +0100
commitd8c3fc1f563424283e89116e92a02b3d956b5eef (patch)
tree73672a9d55d4e6eaa3063cb74823789b4d91a75e /platform
parent5fb94e01cacfc1062d9b9599eb9cc1b3e7fd5e70 (diff)
parentcba1fd7cca0a591ab53232135ef2b5b6729e9f1b (diff)
Merge pull request #72624 from pkdawson/fix-last-focus
DisplayServerWindows: Update `last_focused_window` when the focused subwindow is deleted
Diffstat (limited to 'platform')
-rw-r--r--platform/windows/display_server_windows.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp
index f083cc202f..fe7d91dc18 100644
--- a/platform/windows/display_server_windows.cpp
+++ b/platform/windows/display_server_windows.cpp
@@ -829,6 +829,10 @@ void DisplayServerWindows::delete_sub_window(WindowID p_window) {
}
DestroyWindow(windows[p_window].hWnd);
windows.erase(p_window);
+
+ if (last_focused_window == p_window) {
+ last_focused_window = INVALID_WINDOW_ID;
+ }
}
void DisplayServerWindows::gl_window_make_current(DisplayServer::WindowID p_window_id) {