|
@@ -1782,7 +1782,6 @@ void Viewport::_gui_input_event(InputEvent p_event) {
|
|
|
if (top->data.modal_exclusive || top->data.modal_frame==OS::get_singleton()->get_frames_drawn()) {
|
|
|
//cancel event, sorry, modal exclusive EATS UP ALL
|
|
|
//alternative, you can't pop out a window the same frame it was made modal (fixes many issues)
|
|
|
- //get_tree()->call_group(SceneTree::GROUP_CALL_REALTIME,"windows","_cancel_input_ID",p_event.ID);
|
|
|
get_tree()->set_input_as_handled();
|
|
|
return; // no one gets the event if exclusive NO ONE
|
|
|
}
|
|
@@ -2076,7 +2075,6 @@ void Viewport::_gui_input_event(InputEvent p_event) {
|
|
|
|
|
|
|
|
|
|
|
|
- //get_tree()->call_group(SceneTree::GROUP_CALL_REALTIME,"windows","_cancel_input_ID",p_event.ID);
|
|
|
get_tree()->set_input_as_handled();
|
|
|
|
|
|
|
|
@@ -2116,7 +2114,7 @@ void Viewport::_gui_input_event(InputEvent p_event) {
|
|
|
|
|
|
if (gui.key_event_accepted) {
|
|
|
|
|
|
- get_tree()->call_group(SceneTree::GROUP_CALL_REALTIME,"windows","_cancel_input_ID",p_event.ID);
|
|
|
+ get_tree()->set_input_as_handled();
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
@@ -2176,7 +2174,7 @@ void Viewport::_gui_input_event(InputEvent p_event) {
|
|
|
|
|
|
if (next) {
|
|
|
next->grab_focus();
|
|
|
- get_tree()->call_group(SceneTree::GROUP_CALL_REALTIME,"windows","_cancel_input_ID",p_event.ID);
|
|
|
+ get_tree()->set_input_as_handled();
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -2369,8 +2367,7 @@ void Viewport::_gui_control_grab_focus(Control* p_control) {
|
|
|
if (gui.key_focus && gui.key_focus==p_control)
|
|
|
return;
|
|
|
|
|
|
- _gui_remove_focus();
|
|
|
- get_tree()->call_group(SceneTree::GROUP_CALL_REALTIME,"windows","_gui_remove_focus");
|
|
|
+ get_tree()->call_group(SceneTree::GROUP_CALL_REALTIME,"_viewports","_gui_remove_focus");
|
|
|
gui.key_focus=p_control;
|
|
|
p_control->notification(Control::NOTIFICATION_FOCUS_ENTER);
|
|
|
p_control->update();
|
|
@@ -2678,6 +2675,7 @@ void Viewport::_bind_methods() {
|
|
|
ObjectTypeDB::bind_method(_MD("is_input_disabled"), &Viewport::is_input_disabled);
|
|
|
|
|
|
ObjectTypeDB::bind_method(_MD("_gui_show_tooltip"), &Viewport::_gui_show_tooltip);
|
|
|
+ ObjectTypeDB::bind_method(_MD("_gui_remove_focus"), &Viewport::_gui_remove_focus);
|
|
|
|
|
|
ADD_PROPERTY( PropertyInfo(Variant::RECT2,"rect"), _SCS("set_rect"), _SCS("get_rect") );
|
|
|
ADD_PROPERTY( PropertyInfo(Variant::BOOL,"own_world"), _SCS("set_use_own_world"), _SCS("is_using_own_world") );
|