[Mplayer-cvslog] CVS: main/libvo vo_x11.c,1.44,1.45 vo_xv.c,1.38,1.39 x11_common.h,1.11,1.12 x11_common.c,1.37,1.38

Arpi of Ize arpi at mplayer.dev.hu
Fri Dec 28 14:24:31 CET 2001


Update of /cvsroot/mplayer/main/libvo
In directory mplayer:/var/tmp.root/cvs-serv29004

Modified Files:
	vo_x11.c vo_xv.c x11_common.h x11_common.c 
Log Message:
WinID cleanup, support for Xv

Index: vo_x11.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_x11.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- vo_x11.c	22 Dec 2001 09:20:09 -0000	1.44
+++ vo_x11.c	28 Dec 2001 13:24:27 -0000	1.45
@@ -71,9 +71,6 @@
 static int depth,bpp,mode;
 static XWindowAttributes attribs;
 
-/* output window id */
-int WinID=0;
-
 //static int vo_dwidth,vo_dheight;
 
 static int Flip_Flag;
@@ -284,8 +281,8 @@
      }
 #endif
  
-    if ( WinID ){
-      mywindow = (Window)WinID;
+    if ( WinID>=0 ){
+      mywindow = WinID ? ((Window)WinID) : RootWindow( mDisplay,mScreen );
       XUnmapWindow( mDisplay,mywindow );
       XChangeWindowAttributes( mDisplay,mywindow,xswamask,&xswa );
     }

Index: vo_xv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xv.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- vo_xv.c	17 Dec 2001 14:19:37 -0000	1.38
+++ vo_xv.c	28 Dec 2001 13:24:27 -0000	1.39
@@ -188,9 +188,16 @@
    xswa.border_pixel     = 0;
    xswamask = CWBackPixel | CWBorderPixel;
 
+    if ( WinID>=0 ){
+      mywindow = WinID ? ((Window)WinID) : RootWindow(mDisplay,mScreen);
+      XUnmapWindow( mDisplay,mywindow );
+      XChangeWindowAttributes( mDisplay,mywindow,xswamask,&xswa );
+    } else 
+
    mywindow = XCreateWindow(mDisplay, RootWindow(mDisplay,mScreen),
-   hint.x, hint.y, hint.width, hint.height,
-   0, depth,CopyFromParent,vinfo.visual,xswamask,&xswa);
+       hint.x, hint.y, hint.width, hint.height,
+       0, depth,CopyFromParent,vinfo.visual,xswamask,&xswa);
+
    vo_x11_classhint( mDisplay,mywindow,"xv" );
    vo_hidecursor(mDisplay,mywindow);
 

Index: x11_common.h
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- x11_common.h	24 Oct 2001 17:04:08 -0000	1.11
+++ x11_common.h	28 Dec 2001 13:24:27 -0000	1.12
@@ -12,6 +12,7 @@
 extern Window mRootWin;
 extern int mScreen;
 extern int mLocalDisplay;
+extern int WinID;
 
 int vo_init( void );
 int vo_hidecursor ( Display* , Window );

Index: x11_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- x11_common.c	14 Dec 2001 17:37:45 -0000	1.37
+++ x11_common.c	28 Dec 2001 13:24:27 -0000	1.38
@@ -45,6 +45,8 @@
 int mScreen;
 int mLocalDisplay;
 
+/* output window id */
+int WinID=-1;
 
 void vo_hidecursor ( Display *disp , Window win )
 {




More information about the MPlayer-cvslog mailing list