1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Changed input window to use pad instead of window

This commit is contained in:
James Booth 2012-07-07 20:56:49 +01:00
parent 16ad65d47d
commit 8ba47220ff

View File

@ -58,12 +58,11 @@ void create_input_window(void)
int rows, cols;
getmaxyx(stdscr, rows, cols);
inp_win = newwin(1, cols, rows-1, 0);
inp_win = newpad(1, cols);
wbkgd(inp_win, COLOR_PAIR(1));
keypad(inp_win, TRUE);
// wattrset(inp_win, A_BOLD);
wmove(inp_win, 0, 1);
wrefresh(inp_win);
prefresh(inp_win, 0, 0, rows-1, 0, rows-1, cols);
}
void inp_win_resize(const char * const input, const int size)
@ -71,15 +70,16 @@ void inp_win_resize(const char * const input, const int size)
int rows, cols;
getmaxyx(stdscr, rows, cols);
mvwin(inp_win, rows-1, 0);
wresize(inp_win, 1, cols);
wrefresh(inp_win);
prefresh(inp_win, 0, 0, rows-1, 0, rows-1, cols);
}
void inp_clear(void)
{
int rows, cols;
getmaxyx(stdscr, rows, cols);
wclear(inp_win);
wmove(inp_win, 0, 1);
wrefresh(inp_win);
prefresh(inp_win, 0, 0, rows-1, 0, rows-1, cols);
}
void inp_non_block(void)
@ -146,7 +146,9 @@ void inp_get_password(char *passwd)
void inp_put_back(void)
{
wrefresh(inp_win);
int rows, cols;
getmaxyx(stdscr, rows, cols);
prefresh(inp_win, 0, 0, rows-1, 0, rows-1, cols);
}
/*