# HG changeset patch # User alex # Date 1012475754 0 # Node ID f5fc7e9bac389d57b8756b72a85e1f08b67583f5 # Parent 0c2d2aaf9f86f3800086a04e3ae04f22ec52ab79 vo_x11_uninit: dont destroy window if GUI created it diff -r 0c2d2aaf9f86 -r f5fc7e9bac38 libvo/x11_common.c --- a/libvo/x11_common.c Thu Jan 31 11:04:41 2002 +0000 +++ b/libvo/x11_common.c Thu Jan 31 11:15:54 2002 +0000 @@ -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){ @@ -391,6 +380,24 @@ } #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; XEvent Event;