diff options
author | Yuri Sizov <yuris@humnom.net> | 2023-12-19 13:01:00 +0100 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2023-12-19 13:01:00 +0100 |
commit | 8a9aa30348b9dc1582732f4a8401fc959ea0ecbe (patch) | |
tree | 79ff3a01ac0ec7f511a4b03e21f2e1f5945337ed /scene/main/window.cpp | |
parent | 92e024aac50a539e304ae5945f3c0cf41fefc515 (diff) | |
parent | fa02d19fd170d050bb47c4e525061bf96afdb62a (diff) | |
download | redot-engine-8a9aa30348b9dc1582732f4a8401fc959ea0ecbe.tar.gz |
Merge pull request #81243 from Sauermann/fix-window-events
Fix internal events not being delivered to some Window types
Diffstat (limited to 'scene/main/window.cpp')
-rw-r--r-- | scene/main/window.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scene/main/window.cpp b/scene/main/window.cpp index 36d7d079b2..98b207bd3c 100644 --- a/scene/main/window.cpp +++ b/scene/main/window.cpp @@ -1559,7 +1559,12 @@ void Window::_window_input(const Ref<InputEvent> &p_ev) { } } - if (p_ev->get_device() != InputEvent::DEVICE_ID_INTERNAL) { + // If the event needs to be handled in a Window-derived class, then it should overwrite + // `_input_from_window` instead of subscribing to the `window_input` signal, because the signal + // filters out internal events. + _input_from_window(p_ev); + + if (p_ev->get_device() != InputEvent::DEVICE_ID_INTERNAL && is_inside_tree()) { emit_signal(SceneStringNames::get_singleton()->window_input, p_ev); } |