summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-06-19 23:17:12 +0200
committerGitHub <noreply@github.com>2022-06-19 23:17:12 +0200
commitf58ff85f8f9e0cf878ef097c19c8eacde0c0585d (patch)
tree62c5ae699cef7dcf6266b45052a02470c417a88b /scene
parent747ff071cd68f3411b49f8af5590575aaf9f7218 (diff)
parent459228cdb347a34e2861adb3a86748c44307bb4e (diff)
Merge pull request #62220 from markdibarry/call-group-fixes
Add explicit deferred flags
Diffstat (limited to 'scene')
-rw-r--r--scene/main/canvas_item.cpp4
-rw-r--r--scene/main/scene_tree.cpp2
-rw-r--r--scene/main/window.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/scene/main/canvas_item.cpp b/scene/main/canvas_item.cpp
index 20f3f82a4e..3dc358a6c2 100644
--- a/scene/main/canvas_item.cpp
+++ b/scene/main/canvas_item.cpp
@@ -239,7 +239,7 @@ void CanvasItem::_enter_canvas() {
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 {
CanvasItem *parent = get_parent_item();
@@ -320,7 +320,7 @@ void CanvasItem::_notification(int p_what) {
}
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 {
CanvasItem *p = get_parent_item();
ERR_FAIL_COND(!p);
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp
index f8abda35d2..dd77877c7d 100644
--- a/scene/main/scene_tree.cpp
+++ b/scene/main/scene_tree.cpp
@@ -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) {
- 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) {
diff --git a/scene/main/window.cpp b/scene/main/window.cpp
index 11c2a495ad..d650dffdbd 100644
--- a/scene/main/window.cpp
+++ b/scene/main/window.cpp
@@ -1142,7 +1142,7 @@ void Window::popup(const Rect2i &p_screen_rect) {
// 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);
+ scene_tree->notify_group_flags(SceneTree::GROUP_CALL_DEFERRED, "_viewports", NOTIFICATION_WM_WINDOW_FOCUS_OUT);
}
}