You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-18 14:21:41 +00:00
Send a focus-out notification when opening a Window Manager Popup
This commit is contained in:
@@ -1101,6 +1101,14 @@ void Window::popup_centered_ratio(float p_ratio) {
|
|||||||
void Window::popup(const Rect2i &p_screen_rect) {
|
void Window::popup(const Rect2i &p_screen_rect) {
|
||||||
emit_signal(SNAME("about_to_popup"));
|
emit_signal(SNAME("about_to_popup"));
|
||||||
|
|
||||||
|
if (!_get_embedder() && get_flag(FLAG_POPUP)) {
|
||||||
|
// Send a focus-out notification when opening a Window Manager Popup.
|
||||||
|
SceneTree *scene_tree = get_tree();
|
||||||
|
if (scene_tree) {
|
||||||
|
scene_tree->notify_group("_viewports", NOTIFICATION_WM_WINDOW_FOCUS_OUT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Update window size to calculate the actual window size based on contents minimum size and minimum size.
|
// Update window size to calculate the actual window size based on contents minimum size and minimum size.
|
||||||
_update_window_size();
|
_update_window_size();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user