1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-05 17:15:09 +00:00

Add explicit deferred flags

This commit is contained in:
markdibarry
2022-06-19 10:04:53 -04:00
parent 958254ec3e
commit 459228cdb3
3 changed files with 4 additions and 4 deletions

View File

@@ -239,7 +239,7 @@ void CanvasItem::_enter_canvas() {
get_viewport()->gui_reset_canvas_sort_index(); get_viewport()->gui_reset_canvas_sort_index();
} }
get_tree()->call_group_flags(SceneTree::GROUP_CALL_UNIQUE, group, SNAME("_top_level_raise_self")); get_tree()->call_group_flags(SceneTree::GROUP_CALL_UNIQUE | SceneTree::GROUP_CALL_DEFERRED, group, SNAME("_top_level_raise_self"));
} else { } else {
CanvasItem *parent = get_parent_item(); CanvasItem *parent = get_parent_item();
@@ -320,7 +320,7 @@ void CanvasItem::_notification(int p_what) {
} }
if (group != StringName()) { if (group != StringName()) {
get_tree()->call_group_flags(SceneTree::GROUP_CALL_UNIQUE, group, "_top_level_raise_self"); get_tree()->call_group_flags(SceneTree::GROUP_CALL_UNIQUE | SceneTree::GROUP_CALL_DEFERRED, group, "_top_level_raise_self");
} else { } else {
CanvasItem *p = get_parent_item(); CanvasItem *p = get_parent_item();
ERR_FAIL_COND(!p); ERR_FAIL_COND(!p);

View File

@@ -386,7 +386,7 @@ void SceneTree::set_group_flags(uint32_t p_call_flags, const StringName &p_group
} }
void SceneTree::notify_group(const StringName &p_group, int p_notification) { void SceneTree::notify_group(const StringName &p_group, int p_notification) {
notify_group_flags(0, p_group, p_notification); notify_group_flags(GROUP_CALL_DEFAULT, p_group, p_notification);
} }
void SceneTree::set_group(const StringName &p_group, const String &p_name, const Variant &p_value) { void SceneTree::set_group(const StringName &p_group, const String &p_name, const Variant &p_value) {

View File

@@ -1142,7 +1142,7 @@ void Window::popup(const Rect2i &p_screen_rect) {
// Send a focus-out notification when opening a Window Manager Popup. // Send a focus-out notification when opening a Window Manager Popup.
SceneTree *scene_tree = get_tree(); SceneTree *scene_tree = get_tree();
if (scene_tree) { if (scene_tree) {
scene_tree->notify_group("_viewports", NOTIFICATION_WM_WINDOW_FOCUS_OUT); scene_tree->notify_group_flags(SceneTree::GROUP_CALL_DEFERRED, "_viewports", NOTIFICATION_WM_WINDOW_FOCUS_OUT);
} }
} }