diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2015-03-23 17:04:53 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2015-03-23 17:04:53 -0300 |
commit | ade7993fcb468433d28e569e16e90de4251114ab (patch) | |
tree | d9ff4a02e55373346b87acd174863639e20917fa /ScreenManager.c | |
parent | d0c72c3fb29d535f5bb12b651e3bcaa516650199 (diff) |
incremental search and filter reintegrated!
Diffstat (limited to 'ScreenManager.c')
-rw-r--r-- | ScreenManager.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/ScreenManager.c b/ScreenManager.c index de462ac0..e0993612 100644 --- a/ScreenManager.c +++ b/ScreenManager.c @@ -156,11 +156,16 @@ static void ScreenManager_drawPanels(ScreenManager* this, int focus) { } } +static Panel* setCurrentPanel(Panel* panel) { + FunctionBar_draw(panel->currentBar, NULL); + return panel; +} + void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) { bool quit = false; int focus = 0; - Panel* panelFocus = (Panel*) Vector_get(this->panels, focus); + Panel* panelFocus = setCurrentPanel((Panel*) Vector_get(this->panels, focus)); double oldTime = 0.0; @@ -180,7 +185,6 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) { if (redraw) { ScreenManager_drawPanels(this, focus); - FunctionBar_draw(panelFocus->currentBar, NULL); } int prevCh = ch; @@ -199,7 +203,7 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) { mevent.y > panel->y && mevent.y <= panel->y+panel->h && (this->allowFocusChange || panelFocus == panel) ) { focus = i; - panelFocus = panel; + panelFocus = setCurrentPanel(panel); Panel_setSelected(panel, mevent.y - panel->y + panel->scrollV - 1); break; } @@ -255,7 +259,7 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) { tryLeft: if (focus > 0) focus--; - panelFocus = (Panel*) Vector_get(this->panels, focus); + panelFocus = setCurrentPanel((Panel*) Vector_get(this->panels, focus)); if (Panel_size(panelFocus) == 0 && focus > 0) goto tryLeft; break; @@ -267,7 +271,7 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) { tryRight: if (focus < this->panelCount - 1) focus++; - panelFocus = (Panel*) Vector_get(this->panels, focus); + panelFocus = setCurrentPanel((Panel*) Vector_get(this->panels, focus)); if (Panel_size(panelFocus) == 0 && focus < this->panelCount - 1) goto tryRight; break; |