]> git.ipfire.org Git - thirdparty/newt.git/commitdiff
fixed cursor handling on suspend
authorewt <ewt>
Tue, 22 Aug 2000 17:24:55 +0000 (17:24 +0000)
committerewt <ewt>
Tue, 22 Aug 2000 17:24:55 +0000 (17:24 +0000)
newt.c

diff --git a/newt.c b/newt.c
index 677ddd0e81dfc1032ce880d4e9b52b51ffc4f60e..910ecd269ab3cb143df12374c8b5ac0eb4d7aab9 100644 (file)
--- 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 =
 "  <Tab>/<Alt-Tab> between elements   |  <Space> selects   |  <F12> 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);
 }