Moved resize code to windows.c, reorder main loop
This commit is contained in:
22
windows.c
22
windows.c
@@ -57,6 +57,7 @@ static void _cons_show_incoming_message(const char * const short_from,
|
||||
const int win_index);
|
||||
static void _win_handle_switch(const int * const ch);
|
||||
static void _win_handle_page(const int * const ch);
|
||||
static void _win_handle_resize(const int * const ch);
|
||||
|
||||
void gui_init(void)
|
||||
{
|
||||
@@ -88,15 +89,6 @@ void gui_init(void)
|
||||
dirty = TRUE;
|
||||
}
|
||||
|
||||
void win_resize(void)
|
||||
{
|
||||
create_title_bar();
|
||||
create_status_bar();
|
||||
create_input_window();
|
||||
_current_window_refresh();
|
||||
dirty = TRUE;
|
||||
}
|
||||
|
||||
void gui_refresh(void)
|
||||
{
|
||||
title_bar_refresh();
|
||||
@@ -325,6 +317,7 @@ void win_handle_special_keys(const int * const ch)
|
||||
{
|
||||
_win_handle_switch(ch);
|
||||
_win_handle_page(ch);
|
||||
_win_handle_resize(ch);
|
||||
}
|
||||
|
||||
void win_page_off(void)
|
||||
@@ -521,6 +514,17 @@ static void _win_handle_switch(const int * const ch)
|
||||
}
|
||||
}
|
||||
|
||||
static void _win_handle_resize(const int * const ch)
|
||||
{
|
||||
if (*ch == KEY_RESIZE) {
|
||||
create_title_bar();
|
||||
create_status_bar();
|
||||
create_input_window();
|
||||
_current_window_refresh();
|
||||
dirty = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
static void _win_handle_page(const int * const ch)
|
||||
{
|
||||
int rows, cols, y, x;
|
||||
|
||||
Reference in New Issue
Block a user