[vlc-devel] [PATCH] bug in globalhotkeys

Rémi Denis-Courmont remi at remlab.net
Thu Feb 26 12:30:45 CET 2009


On Thu, 26 Feb 2009 10:54:08 +0100, Sébastien Escudier
<sebastien-devel at celeos.eu> wrote:
> There is a problem in globalhotkeys module.
> If a X11 error is sent after this module unload, the callback function
> X11ErrorHandler will be called but it doesn't exists anymore.

I don't disagree there is a bug. But how did you trigger this?

> This patch restores the previous error handler

This only works if the error handlers are unregistered in exact reverse
registration order.
The X11 video outputs do register their handlers. I don't know about other
plugins. One work around would be:

while (x_error_handler != our_handler) sleep (sometime);
set (previous_handler);

And then we also have a problem with the Xlib thread handling :(

In the long term, we should either:
- use a single Xlib Display managed by the core (with proper Xlib thread
safety initialization), or
- switch to XCB.

Alas the first solution would render libvlccore dependent on Xlib, which
would infuriate Debian multimedia... and the second one requires a lot more
work to bring our XCB support to a decent features level.

-- 
Rémi Denis-Courmont




More information about the vlc-devel mailing list