[vlc-devel] [PATCH] bug in globalhotkeys

Sébastien Escudier sebastien-devel at celeos.eu
Thu Feb 26 12:40:13 CET 2009

Quoting Rémi Denis-Courmont <remi at remlab.net>:

> > 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?

I am using vlc as a library, and my main application triggered a X11 error after
I unloaded vlc. So it crashed.

> > This patch restores the previous error handler
> This only works if the error handlers are unregistered in exact reverse
> registration order.

Unless I am missing something, I think I handled this in my patch because I am
testing if the handler has been changed.
Two cases when we close the module :
- The handler is still vlc's one. It means no one unregistered or changed the
handler, so we can register the one there was before.
- The handler is not vlc's one. It means someone changed it, and I leave it as
it is.

I don't see any case where it doesn't work. If the handler I restore is not
valid anymore, it is not vlc's responsibility

More information about the vlc-devel mailing list