mirror of
https://github.com/mpv-player/mpv
synced 2024-12-23 23:32:26 +00:00
vo_x11_uninit: dont destroy window if GUI created it
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4438 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
3c3c1da6ac
commit
ad69a062ae
@ -238,17 +238,6 @@ int vo_init( void )
|
||||
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 @@ void vo_x11_decoration( Display * vo_Display,Window w,int d )
|
||||
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 @@ void vo_x11_classhint( Display * display,Window window,char *name ){
|
||||
}
|
||||
#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;
|
||||
|
Loading…
Reference in New Issue
Block a user