[Mplayer-cvslog] CVS: main/libvo x11_common.c,1.45,1.46

Alex Beregszaszi alex at mplayer.dev.hu
Thu Jan 31 12:15:56 CET 2002


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

Modified Files:
	x11_common.c 
Log Message:
vo_x11_uninit: dont destroy window if GUI created it

Index: x11_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- x11_common.c	31 Jan 2002 11:04:41 -0000	1.45
+++ x11_common.c	31 Jan 2002 11:15:54 -0000	1.46
@@ -238,17 +238,6 @@
  return 1;
 }
 
-int vo_x11_uninit(Display *display, Window window)
-{
-    XUnmapWindow(display, window);
-
-    /* don't destroy window if -wid specified */
-    if (!(WinID > 0))
-	XDestroyWindow(display, window);
-
-    XCloseDisplay(display);
-    return(1);
-}
 
 #include "../linux/keycodes.h"
 #include "wskeys.h"
@@ -348,7 +337,7 @@
     XSetWindowAttributes attr;
     attr.override_redirect = True;
     XChangeWindowAttributes(vo_Display, w, CWOverrideRedirect, &attr);
-//    XMapWindow(vo_Display], w);
+//    XMapWindow(vo_Display, w);
   }
 
   if(vo_fsmode&8){
@@ -390,6 +379,24 @@
     vo_dwidth=w; vo_dheight=h;
  }
 #endif
+
+int vo_x11_uninit(Display *display, Window window)
+{
+    XUnmapWindow(display, window);
+
+#ifdef HAVE_NEW_GUI
+    /* destroy window only if it's not controlled by GUI */
+    if (vo_window == None)
+#endif
+    {
+	/* and -wid is set */
+	if (!(WinID > 0))
+	    XDestroyWindow(display, window);
+    }
+
+    XCloseDisplay(display);
+    return(1);
+}
 
 int vo_x11_check_events(Display *mydisplay){
  int ret=0;




More information about the MPlayer-cvslog mailing list