aboutsummaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorreduz2015-12-29 10:01:29 -0300
committerreduz2015-12-29 10:01:29 -0300
commit2f19260fb7b7479eab6ad905683cbef8126fc0e8 (patch)
tree52fbb441e7ccbc4e0b5f728c6fcbc8756014b28b /scene/gui
parent45ad1024e12ffa6db0e56cb36c007dd212d5e37e (diff)
downloadgodot-2f19260fb7b7479eab6ad905683cbef8126fc0e8.tar.gz
godot-2f19260fb7b7479eab6ad905683cbef8126fc0e8.tar.zst
godot-2f19260fb7b7479eab6ad905683cbef8126fc0e8.zip
-restrict gui root from being removed while performing input, fixes #2578
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/control.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index ec4886a6a..6e867c45b 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -916,6 +916,7 @@ void Control::_window_show_tooltip() {
void Control::_window_call_input(Control *p_control,const InputEvent& p_input) {
+ _block();
while(p_control) {
@@ -932,6 +933,9 @@ void Control::_window_call_input(Control *p_control,const InputEvent& p_input) {
break;
p_control=p_control->data.parent;
}
+
+ _unblock();
+
}
void Control::_window_input_event(InputEvent p_event) {
@@ -1067,6 +1071,7 @@ void Control::_window_input_event(InputEvent p_event) {
Size2 pos = mpos;
pos = window->focus_inv_xform.xform(pos);
+
window->mouse_over->drop_data(pos,window->drag_data);
window->drag_data=Variant();
//change mouse accordingly