comparison libvo/vo_xvmc.c @ 33434:229982126641

Fix xv/xvmc window background clearing. Set background color only when using ck-method=background. In the other cases clearing of the non-video image area should be done manually. Not drawing on the video image area prevents flickering (visible when resizing).
author iive
date Sun, 29 May 2011 22:46:52 +0000
parents f5805f8c14c1
children 33e13b4ddfcb
comparison
equal deleted inserted replaced
33433:a010c375947c 33434:229982126641
664 XGetWindowAttributes(mDisplay, DefaultRootWindow(mDisplay), &attribs); 664 XGetWindowAttributes(mDisplay, DefaultRootWindow(mDisplay), &attribs);
665 depth=attribs.depth; 665 depth=attribs.depth;
666 if (depth != 15 && depth != 16 && depth != 24 && depth != 32) depth = 24; 666 if (depth != 15 && depth != 16 && depth != 24 && depth != 32) depth = 24;
667 XMatchVisualInfo(mDisplay, mScreen, depth, TrueColor, &vinfo); 667 XMatchVisualInfo(mDisplay, mScreen, depth, TrueColor, &vinfo);
668 668
669 xswa.background_pixel = 0; 669 xswa.border_pixel = 0;
670 if (xv_ck_info.method == CK_METHOD_BACKGROUND) 670 xswamask = CWBorderPixel;
671 if (xv_ck_info.method == CK_METHOD_BACKGROUND){
671 xswa.background_pixel = xv_colorkey; 672 xswa.background_pixel = xv_colorkey;
672 xswa.border_pixel = 0; 673 xswamask |= CWBackPixel;
673 xswamask = CWBackPixel | CWBorderPixel; 674 }
674 675
675 vo_x11_create_vo_window(&vinfo, vo_dx, vo_dy, d_width, d_height, flags, 676 vo_x11_create_vo_window(&vinfo, vo_dx, vo_dy, d_width, d_height, flags,
676 CopyFromParent, "xvmc", title); 677 CopyFromParent, "xvmc", title);
677 XChangeWindowAttributes(mDisplay, vo_window, xswamask, &xswa); 678 XChangeWindowAttributes(mDisplay, vo_window, xswamask, &xswa);
678 679