Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-10-15 20:33:15 +0000
committerStijn Buys <ingar@osirion.org>2008-10-15 20:33:15 +0000
commit1e0df536c2fae85c317ce9c3cc17603d5f98c911 (patch)
tree3ab262d51451cda3e926e9581b294f08d39031d9 /src/ui/widget.cc
parent97fca172fd51270cebd5b722f861a6c753bd4d2a (diff)
moved client console into a Widget
Diffstat (limited to 'src/ui/widget.cc')
-rw-r--r--src/ui/widget.cc14
1 files changed, 14 insertions, 0 deletions
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++;
+ }
+ }
+ }
}