Added title bar refresh to main loop
This commit is contained in:
@@ -18,6 +18,7 @@ void profanity_start(void)
|
|||||||
char cmd[50];
|
char cmd[50];
|
||||||
|
|
||||||
while (cmd_result == AWAIT_COMMAND) {
|
while (cmd_result == AWAIT_COMMAND) {
|
||||||
|
title_bar_refresh();
|
||||||
status_bar_refresh();
|
status_bar_refresh();
|
||||||
inp_get_command_str(cmd);
|
inp_get_command_str(cmd);
|
||||||
cmd_result = handle_start_command(cmd);
|
cmd_result = handle_start_command(cmd);
|
||||||
@@ -52,6 +53,7 @@ static void _profanity_event_loop(int *ch, char *cmd, int *size)
|
|||||||
{
|
{
|
||||||
usleep(1);
|
usleep(1);
|
||||||
|
|
||||||
|
title_bar_refresh();
|
||||||
status_bar_refresh();
|
status_bar_refresh();
|
||||||
|
|
||||||
// handle incoming messages
|
// handle incoming messages
|
||||||
|
|||||||
@@ -15,10 +15,16 @@ void create_title_bar(void)
|
|||||||
title_bar_show(title);
|
title_bar_show(title);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void title_bar_refresh(void)
|
||||||
|
{
|
||||||
|
touchwin(title_bar);
|
||||||
|
wrefresh(title_bar);
|
||||||
|
inp_put_back();
|
||||||
|
}
|
||||||
|
|
||||||
void title_bar_show(char *title)
|
void title_bar_show(char *title)
|
||||||
{
|
{
|
||||||
wclear(title_bar);
|
wclear(title_bar);
|
||||||
mvwprintw(title_bar, 0, 0, " %s", title);
|
mvwprintw(title_bar, 0, 0, " %s", title);
|
||||||
wrefresh(title_bar);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ void create_status_bar(void);
|
|||||||
void create_input_window(void);
|
void create_input_window(void);
|
||||||
|
|
||||||
// title bar actions
|
// title bar actions
|
||||||
|
void title_bar_refresh(void);
|
||||||
void title_bar_show(char *title);
|
void title_bar_show(char *title);
|
||||||
|
|
||||||
// main window actions
|
// main window actions
|
||||||
|
|||||||
Reference in New Issue
Block a user