1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-07-06 01:47:57 +02:00

use touchwin instead of mvwin and this doesn't need its own function

This commit is contained in:
Jfreegman 2013-09-27 16:14:43 -04:00
parent 7da72b79ef
commit 49a10e5a40
2 changed files with 5 additions and 11 deletions

View File

@ -19,8 +19,6 @@
#include <signal.h> #include <signal.h>
#include <locale.h> #include <locale.h>
#include <string.h> #include <string.h>
#include <unistd.h>
#ifdef _WIN32 #ifdef _WIN32
#include <direct.h> #include <direct.h>

View File

@ -279,20 +279,16 @@ static void draw_bar()
refresh(); refresh();
} }
void prepare_window(WINDOW *w)
{
mvwin(w, 0, 0);
#ifndef WIN32
wresize(w, LINES - 2, COLS);
#endif
}
void draw_active_window(Tox *m) void draw_active_window(Tox *m)
{ {
ToxWindow *a = active_window; ToxWindow *a = active_window;
wint_t ch = 0; wint_t ch = 0;
prepare_window(a->window); touchwin(a->window);
#ifndef WIN32
wresize(a->window, LINES - 2, COLS);
#endif
a->blink = false; a->blink = false;
draw_bar(); draw_bar();
a->onDraw(a, m); a->onDraw(a, m);