[MPlayer-dev-eng] Minor x11_common cleanups

Ivan Kalvachev ikalvachev at gmail.com
Sun May 29 02:04:28 CEST 2011


1. In vo_x11_create_smooth_window() the parameters mRoot is left
unused. Instead the global variable mRootWin is used. The only usage
of the function already calls it with mRootWin as parameter for mRoot.
Make the function use mRoot.

2. When creating vo_gl, the functions says we will set Foreground and
passes pointer to a structure. However we never write any value to
that structure, not even cleaning it. As result valgrind complains.
Create the context as empty. The XSetForeground()/Background()
functions would Change the graphic context as needed, there is no need
to pre-set it.
Also all vo_gl usage are setting the value they use, right before they use them.

3. On uninit() right before vo_gl is freed, there is XSetBackground().
Remove it.
The function is relict from the times when there was no uninit functionality.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mrootx11.patch
Type: application/octet-stream
Size: 544 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20110529/c5526a41/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nfgx11.patch
Type: application/octet-stream
Size: 706 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20110529/c5526a41/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uslsx11.patch
Type: application/octet-stream
Size: 363 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20110529/c5526a41/attachment-0002.obj>


More information about the MPlayer-dev-eng mailing list