diff --git a/src/ui/manager.cpp b/src/ui/manager.cpp index de23ce344..44df35bc5 100644 --- a/src/ui/manager.cpp +++ b/src/ui/manager.cpp @@ -75,7 +75,6 @@ static Widget* capture_widget; // The widget that captures the mouse static bool first_time = true; // true when we don't enter in poll yet /* keyboard focus movement stuff */ -static bool move_focus(Manager* manager, Message* msg); static int count_widgets_accept_focus(Widget* widget); static bool childs_accept_focus(Widget* widget, bool first); static Widget* next_widget(Widget* widget); @@ -1113,7 +1112,7 @@ bool Manager::onProcessMessage(Message* msg) // Check the focus movement for foreground (non-desktop) windows. if (win && win->isForeground()) { if (msg->type() == kKeyDownMessage) - move_focus(this, msg); + processFocusMovementMessage(msg); return true; } else @@ -1512,7 +1511,7 @@ void Manager::broadcastKeyMsg(Message* msg) Focus Movement ***********************************************************************/ -static bool move_focus(Manager* manager, Message* msg) +bool Manager::processFocusMovementMessage(Message* msg) { int (*cmp)(Widget*, int, int) = NULL; Widget* focus = NULL; @@ -1525,8 +1524,8 @@ static bool move_focus(Manager* manager, Message* msg) if (focus_widget) { window = focus_widget->window(); } - else if (!manager->children().empty()) { - window = manager->getTopWindow(); + else if (!this->children().empty()) { + window = this->getTopWindow(); } if (!window) @@ -1612,7 +1611,7 @@ static bool move_focus(Manager* manager, Message* msg) } if ((focus) && (focus != focus_widget)) - Manager::getDefault()->setFocus(focus); + setFocus(focus); } return ret; diff --git a/src/ui/manager.h b/src/ui/manager.h index 520a3a8de..14f061531 100644 --- a/src/ui/manager.h +++ b/src/ui/manager.h @@ -84,6 +84,7 @@ namespace ui { LayoutIO* getLayoutIO(); bool isFocusMovementKey(Message* msg); + bool processFocusMovementMessage(Message* msg); // Returns the invalid region in the screen to being updated with // PaintMessages. This region is cleared when each widget receives