X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Flib_options.c;h=f3b1485bf11133947656e959d40c1eec4c655b74;hp=c633d468a8c518d6f6c58194ef31c6ad313f78ea;hb=feb958a7e85895ec23547b7b1a8daa03e85c7b9c;hpb=1078c0231b8a58fbd2dd56b6e0a81b19d6b07f77 diff --git a/ncurses/tinfo/lib_options.c b/ncurses/tinfo/lib_options.c index c633d468..f3b1485b 100644 --- a/ncurses/tinfo/lib_options.c +++ b/ncurses/tinfo/lib_options.c @@ -43,7 +43,7 @@ #include -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); @@ -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. */ - 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; - SP = sp; + _nc_set_screen(sp); rc = _nc_keypad(sp, flag); - SP = save_sp; + _nc_set_screen(save_sp); _nc_unlock_global(curses); } else #endif