Fix WINDOW_EVENT_FOCUS_IN for popups on Windows
On Windows, WINDOW_EVENT_FOCUS_IN was never sent by the display server for popups, because WM_ACTIVATE events are received during the call to _update_window_style, which happened before the callbacks were set. This was causing some issues with the way Popup is now handling closing on parent focus. Now _update_window_style is only called during show_window, after Window initialized callbacks.
This commit is contained in:
parent
5315bff002
commit
bb306750ce
2 changed files with 6 additions and 4 deletions
|
|
@ -246,6 +246,8 @@ void Window::_make_window() {
|
|||
}
|
||||
}
|
||||
|
||||
_update_window_callbacks();
|
||||
|
||||
RS::get_singleton()->viewport_set_update_mode(get_viewport_rid(), RS::VIEWPORT_UPDATE_WHEN_VISIBLE);
|
||||
DisplayServer::get_singleton()->show_window(window_id);
|
||||
}
|
||||
|
|
@ -379,7 +381,6 @@ void Window::set_visible(bool p_visible) {
|
|||
}
|
||||
if (p_visible && window_id == DisplayServer::INVALID_WINDOW_ID) {
|
||||
_make_window();
|
||||
_update_window_callbacks();
|
||||
}
|
||||
} else {
|
||||
if (visible) {
|
||||
|
|
@ -738,7 +739,6 @@ void Window::_notification(int p_what) {
|
|||
//create
|
||||
if (visible) {
|
||||
_make_window();
|
||||
_update_window_callbacks();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue