X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_mouse.c;h=f12686c0af8ba043c62219ca3eb69c440479c022;hp=7785f0d900d7da7e05df057a8410d7bd03744c82;hb=41677b308e138027b7e435f741ee7fe5651237b0;hpb=11dead39816318fe9601e27756b9497caf7ff490 diff --git a/ncurses/base/lib_mouse.c b/ncurses/base/lib_mouse.c index 7785f0d9..f12686c0 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.115 2010/04/24 23:01:13 tom Exp $") +MODULE_ID("$Id: lib_mouse.c,v 1.118 2010/05/15 21:31:12 tom Exp $") #include @@ -758,7 +758,7 @@ _nc_mouse_event(SCREEN *sp) eventp->z = 0; /* bump the next-free pointer into the circular list */ - sp->_mouse_eventp = eventp = NEXT(eventp); + sp->_mouse_eventp = NEXT(eventp); result = TRUE; break; } @@ -866,6 +866,10 @@ _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 ((pthread_self) && (pthread_kill) && (pthread_equal)) + _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 +881,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,