DisplayServerWindows: Update `last_focused_window` when the focused subwindow is deleted

This commit is contained in:
Patrick Dawson 2023-02-02 21:41:36 +01:00
parent a16b0fec40
commit cba1fd7cca
1 changed files with 4 additions and 0 deletions

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