[MPlayer-dev-eng] Stuck mouse buttons
The Wanderer
inverseparadox at comcast.net
Thu Oct 21 20:07:57 CEST 2004
Diego Biurrun wrote:
> Marius Gedminas writes:
>
>> Occasionally (but often enough to get annoying) when I click a
>> mouse button on an mplayer window the button gets stuck
>> I've traced the problem to mplayer_put_key in fifo.c.
> I just tested this patch and it works as advertised. We should
> really fix this ancient bug. Somebody please review and commit this.
I'm not sure what "reviewing" consists of in this type of context, aside
from looking the code over and saying "it looks okay to me" (in which
case I wouldn't be remotely qualified to pass on it), but at the very
least the printfs it adds to fifo.c will need to be changed to mp_msg.
> +static void set_nonblock_flag(int fd) {
> + int oldflags = fcntl(fd, F_GETFL, 0);
> + if (oldflags == -1) {
> + printf("Cannot get file status flags for fd %d!\n", fd);
> + } else {
> + if (fcntl(keyb_fifo_put, F_SETFL, oldflags | O_NONBLOCK) == -1) {
> + printf("Cannot set nonblocking mode for fd %d!\n", fd);
> + }
> + }
> +}
> +void mplayer_put_key(int code){
> + if (write(keyb_fifo_put,&code,4) == -1) {
> + printf("*** key event dropped (FIFO is full) ***\n");
> + }
--
The Wanderer
Warning: Simply because I argue an issue does not mean I agree with any
side of it.
A government exists to serve its citizens, not to control them.
More information about the MPlayer-dev-eng
mailing list