X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_mouse.c;h=4316957918015f336833303a8440f5563a793e30;hp=dac03955116597e8516fddf5adc33bc8fbb9fd7a;hb=3c19a91c36092255fbac7de00e3db8830aefc053;hpb=70322aa06a4a97ebff76d2869ad923cdf51ee0a9 diff --git a/ncurses/base/lib_mouse.c b/ncurses/base/lib_mouse.c index dac03955..43169579 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.121 2011/01/22 19:47:47 tom Exp $") +MODULE_ID("$Id: lib_mouse.c,v 1.122 2011/09/10 22:23:38 tom Exp $") #include @@ -1359,6 +1359,17 @@ NCURSES_SP_NAME(getmouse) (NCURSES_SP_DCLx MEVENT * aevent) /* compute the current-event pointer */ MEVENT *prev = PREV(eventp); +#if 1 + /* copy the event we find there */ + *aevent = *prev; + + TR(TRACE_IEVENT, ("getmouse: returning event %s from slot %ld", + _nc_tracemouse(SP_PARM, prev), + (long) IndexEV(SP_PARM, prev))); + + prev->id = INVALID_EVENT; /* so the queue slot becomes free */ + result = OK; +#else /* 20100102 change prevented "release" events from returning to caller */ if (prev->id != INVALID_EVENT) { /* copy the event we find there */ *aevent = *prev; @@ -1371,6 +1382,7 @@ NCURSES_SP_NAME(getmouse) (NCURSES_SP_DCLx MEVENT * aevent) SP_PARM->_mouse_eventp = PREV(prev); result = OK; } +#endif } returnCode(result); }