summaryrefslogtreecommitdiffstats
path: root/libvo/vo_x11.c
diff options
context:
space:
mode:
Diffstat (limited to 'libvo/vo_x11.c')
-rw-r--r--libvo/vo_x11.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c
index 99094491d9..8be96d8531 100644
--- a/libvo/vo_x11.c
+++ b/libvo/vo_x11.c
@@ -261,7 +261,8 @@ static uint32_t config( uint32_t width,uint32_t height,uint32_t d_width,uint32_t
Visual *visual;
depth = vo_find_depth_from_visuals(mDisplay, mScreen, &visual);
}
- if ( !XMatchVisualInfo( mDisplay,mScreen,depth,DirectColor,&vinfo ))
+ if ( !XMatchVisualInfo( mDisplay,mScreen,depth,DirectColor,&vinfo ) ||
+ WinID > 0 && vinfo.visualid != XVisualIDFromVisual(attribs.visual))
XMatchVisualInfo( mDisplay,mScreen,depth,TrueColor,&vinfo );
/* set image size (which is indeed neither the input nor output size),
@@ -298,7 +299,8 @@ static uint32_t config( uint32_t width,uint32_t height,uint32_t d_width,uint32_t
xswa.background_pixel=0;
xswa.border_pixel=0;
- xswamask=CWBackPixel | CWBorderPixel;
+ xswa.colormap=theCmap;
+ xswamask=CWBackPixel | CWBorderPixel | CWColormap;
#ifdef HAVE_XF86VM
if ( vm )
@@ -322,8 +324,6 @@ static uint32_t config( uint32_t width,uint32_t height,uint32_t d_width,uint32_t
{
if ( vo_window == None )
{
- xswa.colormap=theCmap;
- xswamask|=CWColormap;
vo_window=XCreateWindow( mDisplay,mRootWin,
vo_dx,vo_dy,
vo_dwidth,vo_dheight,