summaryrefslogtreecommitdiff
path: root/scene/main
diff options
context:
space:
mode:
Diffstat (limited to 'scene/main')
-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);
}
}