From: ewt Date: Tue, 22 Aug 2000 17:24:55 +0000 (+0000) Subject: fixed cursor handling on suspend X-Git-Tag: r0-50-17~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e171db1e751551d9be03c9d4d5690682126f902;p=thirdparty%2Fnewt.git fixed cursor handling on suspend --- diff --git a/newt.c b/newt.c index 677ddd0..910ecd2 100644 --- a/newt.c +++ b/newt.c @@ -31,6 +31,7 @@ static char ** currentHelpline = NULL; static int cursorRow, cursorCol; static int needResize; +static int cursorOn = 1; static const char * defaultHelpLine = " / between elements | selects | next screen" @@ -147,8 +148,10 @@ void newtRefresh(void) { } void newtSuspend(void) { + SLtt_set_cursor_visibility (1); SLsmg_suspend_smg(); SLang_reset_tty(); + SLtt_set_cursor_visibility (cursorOn); } void newtResume(void) { @@ -657,9 +660,11 @@ void newtDefaultMappedHandler(newtComponent c, int isMapped) { } void newtCursorOff(void) { - SLtt_set_cursor_visibility (0); + cursorOn = 0; + SLtt_set_cursor_visibility (cursorOn); } void newtCursorOn(void) { - SLtt_set_cursor_visibility (1); + cursorOn = 1; + SLtt_set_cursor_visibility (cursorOn); }