[vlc-devel] [PATCH] -- more small patches for Linux and qt4

brezhoneg1 brezhoneg1 at yahoo.fr
Sat Mar 7 14:10:55 CET 2009


Please, find attached some more small patches for review :

Patch1 : bug or not bug ? at least, vlc hanging
-----------------------------------------------

On Linux(xcommon.c), when activating the vout plugin, a base window is
created, and an MapNotify and an Expose Events are expected before
proceeding further.

Problem is that the Expose event may never occur. Examples are :
- if vlc (qt4) is minimized, and play is triggered via DBUS, rc control
or even the playlist which may not be hidden, vlc hangs till the user
clicks on the minimized vlc.
- if vlc is hidden (systray hide option), it is worse. No way to get out
of the hanging (even Ctrl-C does nothing)
- For those who program with libvlc, that means they cannot start
playing a video and keep it hidden at startup. Note that hiding it later
on is no problem!

The patch just removes this stringent Expose condition. Testing
MapNotify is sufficient to ensure that no Xlib error occurs later on
(BadWindow or BADdrawable).

Also, if displaying a video right away is something that is wanted, the
best place to do it is at the window provider level once the request for
a handle has been issued. Only the window provider can know if the
application is shown/hidden/minimized... and can react accordingly.


Patch2: vlc qt4 and systray
---------------------------

On Ubuntu7.10, when clicking on systray (show/hide) when a video is
playing, Xlib keeps complaining with the following error :

QPainter::begin: Paint device returned engine == 0, type: 1
[????????] x11 video output error: X11 request 42.0 failed with error
code 8:
 BadMatch (invalid parameter attributes)

This patch just changes the order of two qt4 commands (functionally
makes no difference, but xlib seems to like it more !).
Yet Ubuntu7.10 is a bit old. Maybe this behavior have been corrected in
more recent QT4 version ?


Patch3: missing vlc_object_release in qt4 menu.cpp
---------------------------------------------------


Erwan10
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-prevent-vlc-hanging-in-an-infinite-loop-when-vout-ba.patch
Type: application/octet-stream
Size: 2715 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20090307/d9d76592/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-On-Linux-interverting-show-and-activateWindow-p.patch
Type: application/octet-stream
Size: 814 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20090307/d9d76592/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-bug-qt4-menus.cpp.patch
Type: application/octet-stream
Size: 741 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20090307/d9d76592/attachment-0002.obj>


More information about the vlc-devel mailing list