diff options
Diffstat (limited to 'scene/gui/control.cpp')
-rw-r--r-- | scene/gui/control.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 5a0706f01e..91d6a162f5 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -768,6 +768,12 @@ Control* Control::_find_control_at_pos(CanvasItem* p_node,const Point2& p_global c->_window_sort_subwindows(); // sort them + int idx=0; + for (List<Control*>::Element *E=c->window->subwindows.front();E;E=E->next()) { + + if (!E->get()->is_visible()) + continue; + } for (List<Control*>::Element *E=c->window->subwindows.back();E;E=E->prev()) { Control *sw = E->get(); @@ -1126,6 +1132,7 @@ void Control::_window_input_event(InputEvent p_event) { over = _find_control_at_pos(this,pos,parent_xform,window->focus_inv_xform); } + if (window->drag_data.get_type()==Variant::NIL && over && !window->modal_stack.empty()) { Control *top = window->modal_stack.back()->get(); @@ -2267,6 +2274,7 @@ void Control::_window_sort_subwindows() { return; window->modal_stack.sort_custom<CComparator>(); + window->subwindows.sort_custom<CComparator>(); window->subwindow_order_dirty=false; } |