[MPlayer-users] Problem: mplayer window doesn't get focus under X11 on MacOS-X

Mario Kleiner mario.kleiner at tuebingen.mpg.de
Thu Sep 30 00:03:41 CEST 2004

Hi all,

i have the following problem:

When i run mplayer with any of the X11 based video out plugins, e.g., gl 
, gl2, x11 ... under Linux, the mplayer display window initially gets 
the focus, so i can receive keyboard events / control mplayer via 
keyboard without having to activate the window manually via a mouse 
click. This is the behaviour that i would expect.

When i do the same thing on MacOS-X with Apple's X-Server, the mplayer 
window gets inactive/loses windows focus. In the dock i get the 
"Application not responding" message. Therefore i can not receive 
keyboard events without the user doing a mouse click into the mplayer 
window after mplayer startup.

If i use other output plugins on OS-X like e.g., the SDL plugin, the 
mplayer window keeps focus.

Other X11 applications like xcalc, xedit ... don't lose window focus 
when invoked from a xterm.

Could somebody give me some tip on how to fix this?

Background: We want to use mplayer as a tool to present audio/video 
stimuli to human subjects as part of experiments on human visual 
perception. The persons have to respond to the movies via keypresses. 
I've modified the X11 based OpenGL output plugin for this purpose to do 
some funky manipulations on the video frames before display and to log 
keyboard presses into a log file, so i can't avoid X11 and i need to 
collect keyboard responses...

Any help appreciated.


Mario Kleiner
Max Planck Institute for Biological Cybernetics
Spemannstr. 38
72076 Tuebingen

e-mail: mario.kleiner at tuebingen.mpg.de
office: +49 (0)7071/601-734
fax:    +49 (0)7071/601-616
www:    http://www.kyb.tuebingen.mpg.de/bu/people/kleinerm/index.html
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it." - Brian W. Kernighan

More information about the MPlayer-users mailing list