Merge pull request #72624 from pkdawson/fix-last-focus

DisplayServerWindows: Update `last_focused_window` when the focused subwindow is deleted
This commit is contained in:
Rémi Verschelde 2023-02-03 06:24:05 +01:00
commit d8c3fc1f56
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -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) {