[MPlayer-dev-eng] [PATCH] GUI handling messages 2 times
Alexander Strasser
eclipse7 at gmx.net
Mon Nov 15 12:41:36 CET 2004
Hi,
some might already have noticed it, the GUI is broken from the input
system fix ( infamous stuck-mouse-button problem ). If you press for
example 'f' for fullscreen than it might happen that the event is
handled twice and you go into fullscreen and right back. "So what?!"
you say why didn't I notice this bug earlier...
Two answers:
1. You just don't use the GUI ( correct for most devels ;)
2. The problem in this particular case is that MPlayer bugs are good
fellows ( even GUI and non-GUI ones ), so the GUI bug was there
since ages but nobody noticed it 'cause his fellow bug in fifo.c
was hiding the GUI-bug all the time.
Explanation:
The GUI handles events ( for all of it's windows e.g. the video window
too ), but x11_common also handles events for the video window so it
hands the KeyPress events right on to the GUI and the GUI does the
same so the input bug just lets one message through and it is all ok.
But now that the bug was fixed the GUI has problems as it is receiving
key events on the video window two times.
Enough said, simple fix attached. Please comment as I'm not fully sure
what the code exactly did before ( .so?! ).
Alex (beastd)
-------------- next part --------------
Index: libvo/x11_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v
retrieving revision 1.181
diff -u -r1.181 x11_common.c
--- libvo/x11_common.c 14 Nov 2004 11:36:40 -0000 1.181
+++ libvo/x11_common.c 15 Nov 2004 11:42:28 -0000
@@ -1064,7 +1064,7 @@
((keySym & 0xff00) !=
0 ? ((keySym & 0x00ff) + 256) : (keySym));
#ifdef HAVE_NEW_GUI
- if ((use_gui) && (key == wsEnter))
+ if ((use_gui)) // && (key == wsEnter))
break;
#endif
vo_x11_putkey(key);
More information about the MPlayer-dev-eng
mailing list