summaryrefslogtreecommitdiff
path: root/scene/main/window.cpp
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2023-02-15 16:35:16 +0200
committerYuri Sizov <yuris@humnom.net>2023-03-13 14:48:33 +0100
commit764fe8ac519bc37b3f17926fa02c25609de528ed (patch)
tree5c4a7f60131dbebbc7a23c3e4da725298a4e03e0 /scene/main/window.cpp
parentd9297844915abae44f295ddf8064ace8051a2c58 (diff)
Automatically reparent editor message dialogs to avoid error spam.
(cherry picked from commit 921f3b7589084e07a4b6eefd89ec7fe81857a8b7)
Diffstat (limited to 'scene/main/window.cpp')
-rw-r--r--scene/main/window.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/scene/main/window.cpp b/scene/main/window.cpp
index 59e3d307c6..9fb4ed458f 100644
--- a/scene/main/window.cpp
+++ b/scene/main/window.cpp
@@ -1365,8 +1365,11 @@ void Window::_window_input(const Ref<InputEvent> &p_ev) {
emit_signal(SceneStringNames::get_singleton()->window_input, p_ev);
- push_input(p_ev);
- if (!is_input_handled()) {
+ if (is_inside_tree()) {
+ push_input(p_ev);
+ }
+
+ if (!is_input_handled() && is_inside_tree()) {
push_unhandled_input(p_ev);
}
}