diff options
Diffstat (limited to 'client/ui.c')
-rw-r--r-- | client/ui.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/client/ui.c b/client/ui.c index ca96efb..e6e73f0 100644 --- a/client/ui.c +++ b/client/ui.c @@ -11,9 +11,10 @@ #include "ui.h" WINDOW *g_w2_ui_win; -unsigned int g_w2_ui_width = 0; -unsigned int g_w2_ui_height = 0; -void (*g_w2_ui_current_tab)() = &w2_ui_dirc; +unsigned int g_w2_ui_width = 0; +unsigned int g_w2_ui_height = 0; +void (*g_w2_ui_current_tab)(bool first) = &w2_ui_dirc; +void (*g_w2_ui_last_tab)(bool first) = NULL; void w2_ui_main() { g_w2_ui_width = getmaxx(g_w2_ui_win); @@ -25,7 +26,8 @@ void w2_ui_main() { void w2_ui_paint() { w2_ui_paint_statusbar(); if (w2_timer_end(W2_TIMER_UPDATE) >= (1000 / W2_UI_UPDATE_FPS)) { - (*g_w2_ui_current_tab)(); + (*g_w2_ui_current_tab)(g_w2_ui_last_tab != g_w2_ui_current_tab); + g_w2_ui_last_tab = g_w2_ui_current_tab; w2_timer_start(W2_TIMER_UPDATE); } refresh(); |