Mercurial > mplayer.hg
changeset 4437:f5fc7e9bac38
vo_x11_uninit: dont destroy window if GUI created it
author | alex |
---|---|
date | Thu, 31 Jan 2002 11:15:54 +0000 |
parents | 0c2d2aaf9f86 |
children | e01ee848935f |
files | libvo/x11_common.c |
diffstat | 1 files changed, 19 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- 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;