diff options
author | Juan Linietsky <reduzio@gmail.com> | 2020-07-01 09:27:43 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2020-07-01 09:27:43 -0300 |
commit | 239942cfefc51a907b3fe7eff72818b4a7732726 (patch) | |
tree | 1ffd31f47befa0afcb182cbecca98fe92ff028cb /scene/main/viewport.cpp | |
parent | 719609522a30fa9e3b96b028ac5a1d1a65f1678f (diff) |
Ensure embedded mode works again
Also implemented application in/out notifications in X11.
Diffstat (limited to 'scene/main/viewport.cpp')
-rw-r--r-- | scene/main/viewport.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 8042f02fa6..0d5d222f5e 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -2913,6 +2913,10 @@ void Viewport::input(const Ref<InputEvent> &p_event, bool p_local_coords) { return; } + if (!_can_consume_input_events()) { + return; + } + if (!is_input_handled()) { get_tree()->_call_input_pause(input_group, "_input", ev, this); //not a bug, must happen before GUI, order is _input -> gui input -> _unhandled input } @@ -2926,7 +2930,7 @@ void Viewport::input(const Ref<InputEvent> &p_event, bool p_local_coords) { void Viewport::unhandled_input(const Ref<InputEvent> &p_event, bool p_local_coords) { ERR_FAIL_COND(!is_inside_tree()); - if (disable_input) { + if (disable_input || !_can_consume_input_events()) { return; } |