Comment 10 for bug 416294

Revision history for this message
RĂ©mi Denis-Courmont (rdenis) wrote :

For whatever reason, when Cairo-Dock is started Qt4-X11 starts using the ARGB X11 visual, instead of normal RGB. I don't know why, but I assume it's the intended behaviour. Indeed, all Qt4 widgets work fine that way.

VLC breaks because it tries to use a VLC Qt4 plugin video widget directly through X11 (instead of libQt4). There, VLC (1.0 and older) makes an incorrect assumption. It expects that the X11 visual of the Qt4 widget is the same as the visual of the root X11 window. That causes an unexpected error in the X11 protocol. Then, Xlib calls the default error handler, which aborts the VLC process.

Correct mt if I'm wrong. But I believe that the Qt4 API does not provide a way to request a RGB visual instead of ARGB explicitly. So the any application using QWidget::winId has to be ready to handle ARGB visuals. VLC clearly fails here. From the wiki, I infer that Skype has the same bug. For non-Qt4 apps like mplayer, I guess it's a similar problem, though the choice or ARGB is not coming from Qt4-X11.

On the other hand, with an ARGB visual, I am afraid there is no way to use XVideo anymore. At least neither of my XVideo adaptors list the ARGB visual as supported. This means, even if the bug is fixed or worked around in VLC, we cannot use the video overlay anymore, so rendering will be a lot more CPU-demanding.

So in a sense, the proper solution would be for Qt4 to provide a way to disable ARGB for some specific widgets. But to me, this would look more like a new feature than a bug from libQt4.