From 1e0df536c2fae85c317ce9c3cc17603d5f98c911 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Wed, 15 Oct 2008 20:33:15 +0000 Subject: moved client console into a Widget --- src/ui/widget.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/ui/widget.cc') diff --git a/src/ui/widget.cc b/src/ui/widget.cc index 1ecfcc8..24dfe5c 100644 --- a/src/ui/widget.cc +++ b/src/ui/widget.cc @@ -128,6 +128,20 @@ void Widget::show() void Widget::hide() { widget_visible = false; + if (parent() && focus()) { + Widget::Children::reverse_iterator it = parent()->children().rbegin(); + + while (it != parent()->children().rend()) { + Widget *w = (*it); + if (w != this && w->visible()) { + widget_focus = false; + w->widget_focus = true; + it = parent()->children().rend(); + } else { + it++; + } + } + } } -- cgit v1.2.3