diff libvo/vo_xv.c @ 27927:6f199f065e15

Factor common code like -wid handling, vo_gc creation etc. out into x11_common.c
author reimar
date Wed, 19 Nov 2008 20:19:25 +0000
parents 3da3930bf2ac
children 7b03da3f5a9f
line wrap: on
line diff
--- a/libvo/vo_xv.c	Wed Nov 19 16:41:59 2008 +0000
+++ b/libvo/vo_xv.c	Wed Nov 19 20:19:25 2008 +0000
@@ -166,7 +166,6 @@
                        uint32_t format)
 {
     XVisualInfo vinfo;
-    XGCValues xgcv;
     XSetWindowAttributes xswa;
     XWindowAttributes attribs;
     unsigned long xswamask;
@@ -188,8 +187,6 @@
         return -1;
     }
 
-    vo_mouse_autohide = 1;
-
     int_pause = 0;
     visible_buf = -1;
 
@@ -246,38 +243,10 @@
         xswa.border_pixel = 0;
         xswamask = CWBackPixel | CWBorderPixel;
 
-        if (WinID >= 0)
-        {
-            vo_window = WinID ? ((Window) WinID) : mRootWin;
-            if (WinID)
-            {
-                XUnmapWindow(mDisplay, vo_window);
-                XChangeWindowAttributes(mDisplay, vo_window, xswamask,
-                                        &xswa);
-                vo_x11_selectinput_witherr(mDisplay, vo_window,
-                                           StructureNotifyMask |
-                                           KeyPressMask |
-                                           PropertyChangeMask |
-                                           PointerMotionMask |
-                                           ButtonPressMask |
-                                           ButtonReleaseMask |
-                                           ExposureMask);
-                XMapWindow(mDisplay, vo_window);
-                vo_x11_update_geometry();
-                aspect_save_prescale(vo_dwidth, vo_dheight);
-            } else
-                XSelectInput(mDisplay, vo_window, ExposureMask);
-        } else
-        {
             vo_x11_create_vo_window(&vinfo, vo_dx, vo_dy, vo_dwidth, vo_dheight,
                    flags, CopyFromParent, "xv", title);
             XChangeWindowAttributes(mDisplay, vo_window, xswamask, &xswa);
-        }
 
-        if (vo_gc != None)
-            XFreeGC(mDisplay, vo_gc);
-        vo_gc = XCreateGC(mDisplay, vo_window, 0L, &xgcv);
-        XSync(mDisplay, False);
 #ifdef CONFIG_XF86VM
         if (vm)
         {