X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Flib_options.c;h=f3b1485bf11133947656e959d40c1eec4c655b74;hp=ae6b2c5b745f707d2bf731ee98c4c309c18ab2b2;hb=feb958a7e85895ec23547b7b1a8daa03e85c7b9c;hpb=9edffa2f21102c06dcf682d58b074c407bcedd0a diff --git a/ncurses/tinfo/lib_options.c b/ncurses/tinfo/lib_options.c index ae6b2c5b..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.55 2008/05/25 00:32:17 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,16 +245,16 @@ _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(use_screen); + _nc_lock_global(curses); save_sp = SP; - SP = sp; + _nc_set_screen(sp); rc = _nc_keypad(sp, flag); - SP = save_sp; - _nc_unlock_global(use_screen); + _nc_set_screen(save_sp); + _nc_unlock_global(curses); } else #endif {