mirror of
https://github.com/godotengine/godot.git
synced 2024-11-27 09:16:35 +08:00
Do not allow controls in ignore mouse to get focus via their children, fixes #17955
This commit is contained in:
parent
0807e4f348
commit
3331ececc4
@ -1510,12 +1510,17 @@ void Viewport::_gui_call_input(Control *p_control, const Ref<InputEvent> &p_inpu
|
||||
Control *control = Object::cast_to<Control>(ci);
|
||||
if (control) {
|
||||
|
||||
control->emit_signal(SceneStringNames::get_singleton()->gui_input, ev); //signal should be first, so it's possible to override an event (and then accept it)
|
||||
if (control->data.mouse_filter != Control::MOUSE_FILTER_IGNORE) {
|
||||
control->emit_signal(SceneStringNames::get_singleton()->gui_input, ev); //signal should be first, so it's possible to override an event (and then accept it)
|
||||
}
|
||||
if (gui.key_event_accepted)
|
||||
break;
|
||||
if (!control->is_inside_tree())
|
||||
break;
|
||||
control->call_multilevel(SceneStringNames::get_singleton()->_gui_input, ev);
|
||||
|
||||
if (control->data.mouse_filter != Control::MOUSE_FILTER_IGNORE) {
|
||||
control->call_multilevel(SceneStringNames::get_singleton()->_gui_input, ev);
|
||||
}
|
||||
|
||||
if (!control->is_inside_tree() || control->is_set_as_toplevel())
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user