mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 12:52:46 +00:00
do the resize signally properly
This commit is contained in:
parent
df330f33fd
commit
5195c065c6
1 changed files with 12 additions and 11 deletions
|
@ -69,6 +69,7 @@ static WINDOW *output;
|
|||
static WINDOW *status;
|
||||
static WINDOW *input;
|
||||
static int screen_x, screen_y;
|
||||
static int interrupted;
|
||||
|
||||
#define MAXCMDLINE 256
|
||||
static inputline_t *input_line;
|
||||
|
@ -111,7 +112,7 @@ C_ExecLine (const char *line)
|
|||
static void
|
||||
sigwinch (int sig)
|
||||
{
|
||||
ungetch (KEY_RESIZE);
|
||||
interrupted = 1;
|
||||
signal (SIGWINCH, sigwinch);
|
||||
}
|
||||
#endif
|
||||
|
@ -231,17 +232,17 @@ C_ProcessInput (void)
|
|||
int ch = wgetch (input), i;
|
||||
const char *text;
|
||||
|
||||
switch (ch) {
|
||||
case KEY_RESIZE:
|
||||
{
|
||||
if (interrupted) {
|
||||
struct winsize size;
|
||||
|
||||
interrupted = 0;
|
||||
if (ioctl (fileno (stdout), TIOCGWINSZ, &size) == 0) {
|
||||
resizeterm (size.ws_row, size.ws_col);
|
||||
wrefresh (curscr);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
switch (ch) {
|
||||
case KEY_ENTER:
|
||||
case '\n':
|
||||
case '\r':
|
||||
|
|
Loading…
Reference in a new issue