[MPlayer-dev-eng] Stuck mouse buttons

attila attila at pai.kinali.ch
Sun Jul 18 14:38:24 CEST 2004


On Tue, Mar 30, 2004 at 08:29:26PM +0300, Marius Gedminas wrote:
> (resending this to mplayer-dev-eng as requested)
> 
> Occasionally (but often enough to get annoying) when I click a mouse
> button on an mplayer window the button gets stuck -- hitting any key
> afterwards produces messages like
> 
>   No bind found for key MOUSE_BTN1-SPACE
> 
> although MOUSE_BTN1 is *not* held down.  It is easy for me to reproduce
> the problem by hitting a mouse button for a very brief period of time.
> It is even easier with tp-scroll[1], which is a gpm-like program that
> lets me emulate the mouse wheel on a ThinkPad with its 3-button
> trackpoint.  Tp-scroll emits the middle button release event immediately
> after the press event and always triggers the problem.
[...] 
> I suspect that select on a pipe will not say the fd is ready for writing
> if the buffer is not completely empty.  Normally you can write up to
> PIPE_BUF bytes without blocking, but if the buffer already contains
> something, then writing PIPE_BUF bytes would block.  IOW using select
> for a generic FIFO buffer does not work well.
> 
> I think a better solution would be to use nonblocking writes.  Something
> like the attached patch (tested here, but not tested for portability --
> and the #ifdef with HAVE_NO_POSIX_SELECT should be changed to something
> different as well).
> 
> Or maybe it would be simplest to always use the in-memory array solution
> (mplayer_put_key + mplayer_get_key).  I expect it to be marginally
> faster as well (no syscalls, no context switches).

Any comments about this patch ?
I didnt really have a look at it but IMHO something
similar should be commited to fix this long outstanding
bug (yes, i experiance it too from time to time, but never found its
source)


			Attila Kinali




More information about the MPlayer-dev-eng mailing list