[Mplayer-cvslog] CVS: main/libvo vo_x11.c,1.75,1.76 vo_xvidix.c,1.22,1.23

Zoltan Ponekker pontscho at mplayer.dev.hu
Fri Feb 22 16:22:29 CET 2002


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

Modified Files:
	vo_x11.c vo_xvidix.c 
Log Message:
mondom fix bazmeg.

Index: vo_x11.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_x11.c,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -r1.75 -r1.76
--- vo_x11.c	22 Feb 2002 14:48:38 -0000	1.75
+++ vo_x11.c	22 Feb 2002 15:22:27 -0000	1.76
@@ -290,8 +290,7 @@
  aspect= ((1<<16)*d_width + d_height/2)/d_height;
 
 #ifdef HAVE_NEW_GUI
- if ( vo_window != None ) { vo_window=vo_window; vo_gc=vo_gc; }
-  else
+ if ( vo_window == None )
 #endif   
    {
     if( !vo_init() ) return 0; // Can't open X11
@@ -376,6 +375,8 @@
     XSync( mDisplay,False );
     vo_gc=XCreateGC( mDisplay,vo_window,0L,&xgcv );
 
+    XSelectInput( mDisplay,vo_window,StructureNotifyMask | KeyPressMask | ButtonPressMask | ButtonReleaseMask );
+
 #ifdef HAVE_XF86VM
     if ( vm )
      {
@@ -431,16 +432,6 @@
     return -1;
   }
 
-#ifdef HAVE_NEW_GUI  
- if ( vo_window == None ) 
-#endif 
-  {
-   XSelectInput( mDisplay,vo_window,StructureNotifyMask | KeyPressMask 
-#ifdef HAVE_NEW_INPUT
-		 | ButtonPressMask | ButtonReleaseMask
-#endif
-    );
-  }
  saver_off(mDisplay);
  return 0;
 }

Index: vo_xvidix.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xvidix.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- vo_xvidix.c	21 Feb 2002 13:28:39 -0000	1.22
+++ vo_xvidix.c	22 Feb 2002 15:22:27 -0000	1.23
@@ -46,11 +46,9 @@
 #define UNUSED(x) ((void)(x)) /* Removes warning about unused arguments */
 
 /* X11 related variables */
-static Window mWindow;
 static int X_already_started = 0;
 
 /* Colorkey handling */
-static GC mGC;
 static XGCValues mGCV;
 static uint32_t	fgColor;
 static vidix_grkey_t gr_key;
@@ -94,10 +92,10 @@
     }
 #endif
 
-    XGetGeometry(mDisplay, mWindow, &mRoot, &drwX, &drwY, &drwWidth,
+    XGetGeometry(mDisplay, vo_window, &mRoot, &drwX, &drwY, &drwWidth,
 	&drwHeight, &drwBorderWidth, &drwDepth);
     drwX = drwY = 0;
-    XTranslateCoordinates(mDisplay, mWindow, mRoot, 0, 0,
+    XTranslateCoordinates(mDisplay, vo_window, mRoot, 0, 0,
 	&drwcX, &drwcY, &mRoot);
 
     if (!mFullscreen)
@@ -173,10 +171,10 @@
     /* mDrawColorKey: */
 
     /* fill drawable with specified color */
-    XSetBackground( mDisplay,mGC,0 );
-    XClearWindow( mDisplay,mWindow );
-    XSetForeground(mDisplay, mGC, fgColor);
-    XFillRectangle(mDisplay, mWindow, mGC, drwX, drwY, drwWidth,
+    XSetBackground( mDisplay,vo_gc,0 );
+    XClearWindow( mDisplay,vo_window );
+    XSetForeground(mDisplay, vo_gc, fgColor);
+    XFillRectangle(mDisplay, vo_window, vo_gc, drwX, drwY, drwWidth,
 	(mFullscreen ? drwHeight - 1 : drwHeight));
     /* flush, update drawable */
     XFlush(mDisplay);
@@ -310,49 +308,44 @@
 
     if (WinID >= 0)
     {
-	mWindow = WinID ? ((Window)WinID) : RootWindow(mDisplay, mScreen);
-	XUnmapWindow(mDisplay, mWindow);
-	XChangeWindowAttributes(mDisplay, mWindow, xswamask, &xswa);
+	vo_window = WinID ? ((Window)WinID) : RootWindow(mDisplay, mScreen);
+	XUnmapWindow(mDisplay, vo_window);
+	XChangeWindowAttributes(mDisplay, vo_window, xswamask, &xswa);
     }
     else
-	mWindow = XCreateWindow(mDisplay, RootWindow(mDisplay, mScreen),
+	vo_window = XCreateWindow(mDisplay, RootWindow(mDisplay, mScreen),
 	    window_x, window_y, window_width, window_height, xswa.border_pixel,
 	    vinfo.depth, InputOutput, vinfo.visual, xswamask, &xswa);
 
-    vo_x11_classhint(mDisplay, mWindow, "xvidix");
-    vo_hidecursor(mDisplay, mWindow);
+    vo_x11_classhint(mDisplay, vo_window, "xvidix");
+    vo_hidecursor(mDisplay, vo_window);
 
 #ifdef X11_FULLSCREEN
     if (mFullscreen) /* fullscreen */
-	vo_x11_decoration(mDisplay, mWindow, 0);
+	vo_x11_decoration(mDisplay, vo_window, 0);
 #endif
 
-    XGetNormalHints(mDisplay, mWindow, &hint);
+    XGetNormalHints(mDisplay, vo_window, &hint);
     hint.x = window_x;
     hint.y = window_y;
     hint.base_width = hint.width = window_width;
     hint.base_height = hint.height = window_height;
     hint.flags = USPosition | USSize;
-    XSetNormalHints(mDisplay, mWindow, &hint);
+    XSetNormalHints(mDisplay, vo_window, &hint);
 
-    XStoreName(mDisplay, mWindow, title);
+    XStoreName(mDisplay, vo_window, title);
     /* Map window. */
 
-    XMapWindow(mDisplay, mWindow);
+    XMapWindow(mDisplay, vo_window);
 #ifdef HAVE_XINERAMA
-    vo_x11_xinerama_move(mDisplay, mWindow);
+    vo_x11_xinerama_move(mDisplay, vo_window);
 #endif
 
-    mGC = XCreateGC(mDisplay, mWindow, GCForeground, &mGCV);
+    vo_gc = XCreateGC(mDisplay, vo_window, GCForeground, &mGCV);
 
+    XSelectInput( mDisplay,vo_window,StructureNotifyMask | KeyPressMask | ButtonPressMask | ButtonReleaseMask );
 #ifdef HAVE_NEW_GUI
 }
-else
-{
-    /* window was created by GUI */
-    mWindow = vo_window;
-    mGC = vo_gc;
-}
 #endif
 
     mp_msg(MSGT_VO, MSGL_INFO, "[xvidix] image properties: %dx%d depth: %d\n",
@@ -372,13 +365,8 @@
     set_window(1,info);
     if(info) memcpy(&vtune,info,sizeof(vo_tune_info_t));
     else     memset(&vtune,0,sizeof(vo_tune_info_t));
-#ifdef HAVE_NEW_GUI
-    if (vo_window == None)
-#endif
-    {
-	XFlush(mDisplay);
-	XSync(mDisplay, False);
-    }
+    XFlush(mDisplay);
+    XSync(mDisplay, False);
 
     saver_off(mDisplay); /* turning off screen saver */
 
@@ -444,7 +432,7 @@
     vidix_term();
 
     saver_on(mDisplay); /* screen saver back on */
-    vo_x11_uninit(mDisplay, mWindow);
+    vo_x11_uninit(mDisplay, vo_window);
 }
 
 static uint32_t preinit(const char *arg)




More information about the MPlayer-cvslog mailing list