summaryrefslogtreecommitdiffstats
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
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2023-02-21 12:32:11 +0200
commit921f3b7589084e07a4b6eefd89ec7fe81857a8b7 (patch)
tree31ec1014899b5e50d48e37147efe504c06a9c2c1 /scene/main/window.cpp
parent6cde3fac328e97e66b1c12d386deb25af395e215 (diff)
downloadredot-engine-921f3b7589084e07a4b6eefd89ec7fe81857a8b7.tar.gz
Automatically reparent editor message dialogs to avoid error spam.
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);
}
}