about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2013-04-22 00:02:56 +0100
committerJames Booth <boothj5@gmail.com>2013-04-22 00:02:56 +0100
commit5805ee3546a64fc2d3ac874669be1f8b79ec8bad (patch)
tree59b77b8dfb62c016eb2b033711493d1aaed8dffb /src
parent81020e6d4378e98039f1ba91bbba748c4283e7d1 (diff)
downloadprofani-tty-5805ee3546a64fc2d3ac874669be1f8b79ec8bad.tar.gz
Use werase() rather than wclear() to avoid screen flash
Diffstat (limited to 'src')
-rw-r--r--src/ui/inputwin.c2
-rw-r--r--src/ui/statusbar.c8
-rw-r--r--src/ui/titlebar.c6
-rw-r--r--src/ui/windows.c2
4 files changed, 9 insertions, 9 deletions
diff --git a/src/ui/inputwin.c b/src/ui/inputwin.c
index 9570a563..dfac289f 100644
--- a/src/ui/inputwin.c
+++ b/src/ui/inputwin.c
@@ -238,7 +238,7 @@ inp_win_reset(void)
 static void
 _clear_input(void)
 {
-    wclear(inp_win);
+    werase(inp_win);
     wmove(inp_win, 0, 0);
 }
 
diff --git a/src/ui/statusbar.c b/src/ui/statusbar.c
index a2b09470..3f0798d3 100644
--- a/src/ui/statusbar.c
+++ b/src/ui/statusbar.c
@@ -98,7 +98,7 @@ status_bar_resize(void)
     mvwin(status_bar, rows-2, 0);
     wresize(status_bar, 1, cols);
     wbkgd(status_bar, COLOUR_STATUS_TEXT);
-    wclear(status_bar);
+    werase(status_bar);
     wattron(status_bar, COLOUR_STATUS_BRACKET);
     mvwprintw(status_bar, 0, cols - 31, _active);
     wattroff(status_bar, COLOUR_STATUS_BRACKET);
@@ -189,7 +189,7 @@ status_bar_print_message(const char * const msg)
         message = NULL;
     }
 
-    wclear(status_bar);
+    werase(status_bar);
 
     message = (char *) malloc((strlen(msg) + 1) * sizeof(char));
     strcpy(message, msg);
@@ -228,7 +228,7 @@ status_bar_clear(void)
         is_new[i] = FALSE;
     }
 
-    wclear(status_bar);
+    werase(status_bar);
 
     int cols = getmaxx(stdscr);
 
@@ -247,7 +247,7 @@ status_bar_clear_message(void)
         message = NULL;
     }
 
-    wclear(status_bar);
+    werase(status_bar);
 
     int cols = getmaxx(stdscr);
 
diff --git a/src/ui/titlebar.c b/src/ui/titlebar.c
index 5c8cee83..c786c774 100644
--- a/src/ui/titlebar.c
+++ b/src/ui/titlebar.c
@@ -52,7 +52,7 @@ create_title_bar(void)
 void
 title_bar_title(void)
 {
-    wclear(title_bar);
+    werase(title_bar);
     recipient = NULL;
     typing_elapsed = NULL;
     title_bar_show("Profanity. Type /help for help information.");
@@ -67,7 +67,7 @@ title_bar_resize(void)
 
     wresize(title_bar, 1, cols);
     wbkgd(title_bar, COLOUR_TITLE_TEXT);
-    wclear(title_bar);
+    werase(title_bar);
     _title_bar_draw_title();
     _title_bar_draw_status();
     dirty = TRUE;
@@ -173,7 +173,7 @@ title_bar_set_typing(gboolean is_typing)
 void
 title_bar_draw(void)
 {
-    wclear(title_bar);
+    werase(title_bar);
     _title_bar_draw_status();
     _title_bar_draw_title();
 }
diff --git a/src/ui/windows.c b/src/ui/windows.c
index 9a10557c..62d16167 100644
--- a/src/ui/windows.c
+++ b/src/ui/windows.c
@@ -570,7 +570,7 @@ ui_switch_win(const int i)
 void
 win_current_clear(void)
 {
-    wclear(current->win);
+    werase(current->win);
     dirty = TRUE;
 }