X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_mouse.c;h=621f8f70d29e69b4ac57f27349496b8155b244c4;hp=5b9eb7c3f1b6cbe015bfbb3c99854169fe941ed9;hb=b87ec59eb4557919fe1f8cec1c367cd81f061ed9;hpb=92e187a3459ab7ce1613a3684ca6642447c73620 diff --git a/ncurses/base/lib_mouse.c b/ncurses/base/lib_mouse.c index 5b9eb7c3..621f8f70 100644 --- a/ncurses/base/lib_mouse.c +++ b/ncurses/base/lib_mouse.c @@ -84,7 +84,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_mouse.c,v 1.116 2010/05/01 19:29:31 tom Exp $") +MODULE_ID("$Id: lib_mouse.c,v 1.120 2011/01/01 22:25:49 tom Exp $") #include @@ -866,6 +866,12 @@ _nc_mouse_inline(SCREEN *sp) * Wheel mice may return buttons 4 and 5 when the wheel is turned. * We encode those as button presses. */ +# if USE_PTHREADS_EINTR +# if USE_WEAK_SYMBOLS + if ((pthread_self) && (pthread_kill) && (pthread_equal)) +# endif + _nc_globals.read_thread = pthread_self(); +# endif for (grabbed = 0; grabbed < 3; grabbed += (size_t) res) { /* For VIO mouse we add extra bit 64 to disambiguate button-up. */ @@ -877,6 +883,9 @@ _nc_mouse_inline(SCREEN *sp) if (res == -1) break; } +#if USE_PTHREADS_EINTR + _nc_globals.read_thread = 0; +#endif kbuf[3] = '\0'; TR(TRACE_IEVENT, @@ -1441,7 +1450,7 @@ NCURSES_SP_NAME(mousemask) (NCURSES_SP_DCLx mmask_t newmask, mmask_t * oldmask) } } } - returnBits(result); + returnMMask(result); } #if NCURSES_SP_FUNCS