diff options
Diffstat (limited to 'scene/main/window.cpp')
-rw-r--r-- | scene/main/window.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/scene/main/window.cpp b/scene/main/window.cpp index 7f2160c6a5..8604bb78ac 100644 --- a/scene/main/window.cpp +++ b/scene/main/window.cpp @@ -874,6 +874,10 @@ void Window::child_controls_changed() { call_deferred("_update_child_controls"); } +bool Window::_can_consume_input_events() const { + return exclusive_child == nullptr; +} + void Window::_window_input(const Ref<InputEvent> &p_ev) { if (Engine::get_singleton()->is_editor_hint() && (Object::cast_to<InputEventJoypadButton>(p_ev.ptr()) || Object::cast_to<InputEventJoypadMotion>(*p_ev))) { return; //avoid joy input on editor @@ -890,10 +894,13 @@ void Window::_window_input(const Ref<InputEvent> &p_ev) { if (exclusive_child != nullptr) { exclusive_child->grab_focus(); - return; //has an exclusive child, can't get events until child is closed + if (!is_embedding_subwindows()) { //not embedding, no need for event + return; + } } emit_signal(SceneStringNames::get_singleton()->window_input, p_ev); + input(p_ev); if (!is_input_handled()) { unhandled_input(p_ev); |