]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tinfo/lib_options.c
ncurses 5.6 - patch 20080925
[ncurses.git] / ncurses / tinfo / lib_options.c
index c633d468a8c518d6f6c58194ef31c6ad313f78ea..f3b1485bf11133947656e959d40c1eec4c655b74 100644 (file)
@@ -43,7 +43,7 @@
 
 #include <term.h>
 
 
 #include <term.h>
 
-MODULE_ID("$Id: lib_options.c,v 1.56 2008/06/07 14:01:46 tom Exp $")
+MODULE_ID("$Id: lib_options.c,v 1.58 2008/08/16 21:20:48 Werner.Fink Exp $")
 
 static int _nc_curs_set(SCREEN *, int);
 static int _nc_meta(SCREEN *, bool);
 
 static int _nc_curs_set(SCREEN *, int);
 static int _nc_meta(SCREEN *, bool);
@@ -245,15 +245,15 @@ _nc_keypad(SCREEN *sp, bool flag)
         * has wgetch() reading in more than one thread.  putp() and below
         * may use SP explicitly.
         */
         * has wgetch() reading in more than one thread.  putp() and below
         * may use SP explicitly.
         */
-       if (sp != SP) {
+       if (_nc_use_pthreads && sp != SP) {
            SCREEN *save_sp;
 
            /* cannot use use_screen(), since that is not in tinfo library */
            _nc_lock_global(curses);
            save_sp = SP;
            SCREEN *save_sp;
 
            /* cannot use use_screen(), since that is not in tinfo library */
            _nc_lock_global(curses);
            save_sp = SP;
-           SP = sp;
+           _nc_set_screen(sp);
            rc = _nc_keypad(sp, flag);
            rc = _nc_keypad(sp, flag);
-           SP = save_sp;
+           _nc_set_screen(save_sp);
            _nc_unlock_global(curses);
        } else
 #endif
            _nc_unlock_global(curses);
        } else
 #endif