mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-31 16:51:08 +00:00
a bit of ncurses related cleanup
doesn't fix the corrupted input line when the output window is busy, but that might be a gnome-terminal bug (seems to be ok on the linux console)
This commit is contained in:
parent
37e52bad71
commit
b49614a44f
1 changed files with 5 additions and 9 deletions
|
@ -170,14 +170,14 @@ static inline void
|
||||||
sv_refresh (view_t *view)
|
sv_refresh (view_t *view)
|
||||||
{
|
{
|
||||||
sv_view_t *sv_view = view->data;
|
sv_view_t *sv_view = view->data;
|
||||||
wnoutrefresh (sv_view->win);
|
wnoutrefresh ((WINDOW *) sv_view->win);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
sv_getch (view_t *view)
|
sv_getch (view_t *view)
|
||||||
{
|
{
|
||||||
sv_view_t *sv_view = view->data;
|
sv_view_t *sv_view = view->data;
|
||||||
return wgetch (sv_view->win);
|
return wgetch ((WINDOW *) sv_view->win);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
|
@ -186,7 +186,7 @@ sv_draw (view_t *view)
|
||||||
sv_view_t *sv_view = view->data;
|
sv_view_t *sv_view = view->data;
|
||||||
if (sv_view->draw)
|
if (sv_view->draw)
|
||||||
sv_view->draw (view);
|
sv_view->draw (view);
|
||||||
wnoutrefresh (sv_view->win);
|
wnoutrefresh ((WINDOW *) sv_view->win);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
|
@ -203,14 +203,11 @@ sv_setgeometry (view_t *view)
|
||||||
static void
|
static void
|
||||||
sv_complete (inputline_t *il)
|
sv_complete (inputline_t *il)
|
||||||
{
|
{
|
||||||
view_t *view = il->user_data;
|
|
||||||
batch_print = 1;
|
batch_print = 1;
|
||||||
Con_BasicCompleteCommandLine (il);
|
Con_BasicCompleteCommandLine (il);
|
||||||
sv_refresh (view);
|
|
||||||
batch_print = 0;
|
batch_print = 0;
|
||||||
|
|
||||||
sv_refresh (output);
|
sv_refresh (output);
|
||||||
// move the cursor back to the input line
|
|
||||||
sv_refresh (input);
|
sv_refresh (input);
|
||||||
doupdate ();
|
doupdate ();
|
||||||
}
|
}
|
||||||
|
@ -460,7 +457,6 @@ process_input (void)
|
||||||
}
|
}
|
||||||
C_KeyEvent (ch, 0, 1);
|
C_KeyEvent (ch, 0, 1);
|
||||||
}
|
}
|
||||||
doupdate ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -493,8 +489,10 @@ key_event (knum_t key, short unicode, qboolean down)
|
||||||
default:
|
default:
|
||||||
sv_view = input->data;
|
sv_view = input->data;
|
||||||
Con_ProcessInputLine (sv_view->obj, key);
|
Con_ProcessInputLine (sv_view->obj, key);
|
||||||
|
sv_refresh (input);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
doupdate ();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -507,8 +505,6 @@ print (char *txt)
|
||||||
draw_fun_char (sv_view->win, (byte) *txt++, 0);
|
draw_fun_char (sv_view->win, (byte) *txt++, 0);
|
||||||
if (!batch_print) {
|
if (!batch_print) {
|
||||||
sv_refresh (output);
|
sv_refresh (output);
|
||||||
// move the cursor back to the input line
|
|
||||||
sv_refresh (input);
|
|
||||||
doupdate ();
|
doupdate ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue