Use wnoutrefresh, pnoutrefresh and doupdate

Issue #298
This commit is contained in:
James Booth
2014-02-02 23:56:50 +00:00
parent 42300fdc18
commit 0f0cd4cdab
7 changed files with 9 additions and 7 deletions

View File

@@ -201,7 +201,7 @@ _cons_about(void)
cons_check_version(FALSE); cons_check_version(FALSE);
} }
prefresh(console->win, 0, 0, 1, 0, rows-3, cols-1); pnoutrefresh(console->win, 0, 0, 1, 0, rows-3, cols-1);
wins_refresh_console(); wins_refresh_console();
cons_alert(); cons_alert();

View File

@@ -104,6 +104,7 @@ _ui_refresh(void)
title_bar_refresh(); title_bar_refresh();
status_bar_refresh(); status_bar_refresh();
inp_put_back(); inp_put_back();
doupdate();
} }
static unsigned long static unsigned long

View File

@@ -45,7 +45,7 @@
#include "ui/windows.h" #include "ui/windows.h"
#include "xmpp/xmpp.h" #include "xmpp/xmpp.h"
#define _inp_win_refresh() prefresh(inp_win, 0, pad_start, rows-1, 0, rows-1, cols-1) #define _inp_win_refresh() pnoutrefresh(inp_win, 0, pad_start, rows-1, 0, rows-1, cols-1)
static WINDOW *inp_win; static WINDOW *inp_win;
static int pad_start = 0; static int pad_start = 0;
@@ -208,6 +208,7 @@ _inp_get_password(char *passwd)
{ {
_clear_input(); _clear_input();
_inp_win_refresh(); _inp_win_refresh();
doupdate();
noecho(); noecho();
mvwgetnstr(inp_win, 0, 1, passwd, MAX_PASSWORD_SIZE); mvwgetnstr(inp_win, 0, 1, passwd, MAX_PASSWORD_SIZE);
wmove(inp_win, 0, 0); wmove(inp_win, 0, 0);

View File

@@ -100,7 +100,7 @@ _status_bar_refresh(void)
if (dirty) { if (dirty) {
_status_bar_update_time(); _status_bar_update_time();
_update_win_statuses(); _update_win_statuses();
wrefresh(status_bar); wnoutrefresh(status_bar);
inp_put_back(); inp_put_back();
dirty = FALSE; dirty = FALSE;
} }

View File

@@ -52,7 +52,7 @@ _create_title_bar(void)
wbkgd(win, COLOUR_TITLE_TEXT); wbkgd(win, COLOUR_TITLE_TEXT);
title_bar_console(); title_bar_console();
title_bar_set_presence(CONTACT_OFFLINE); title_bar_set_presence(CONTACT_OFFLINE);
wrefresh(win); wnoutrefresh(win);
inp_put_back(); inp_put_back();
} }
@@ -254,7 +254,7 @@ _title_bar_draw(void)
mvwaddch(win, 0, cols - 2, ']'); mvwaddch(win, 0, cols - 2, ']');
wattroff(win, COLOUR_TITLE_BRACKET); wattroff(win, COLOUR_TITLE_BRACKET);
wrefresh(win); wnoutrefresh(win);
inp_put_back(); inp_put_back();
} }

View File

@@ -110,7 +110,7 @@ win_refresh(ProfWin *window)
{ {
int rows, cols; int rows, cols;
getmaxyx(stdscr, rows, cols); getmaxyx(stdscr, rows, cols);
prefresh(window->win, window->y_pos, 0, 1, 0, rows-3, cols-1); pnoutrefresh(window->win, window->y_pos, 0, 1, 0, rows-3, cols-1);
} }
void void

View File

@@ -279,7 +279,7 @@ wins_resize_all(void)
ProfWin *current_win = wins_get_current(); ProfWin *current_win = wins_get_current();
prefresh(current_win->win, current_win->y_pos, 0, 1, 0, rows-3, cols-1); pnoutrefresh(current_win->win, current_win->y_pos, 0, 1, 0, rows-3, cols-1);
} }
void void