diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2008-11-22 19:16:43 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2008-11-22 19:16:43 +0200 |
commit | 6cbca28085f1698bc7c6537631d5efbadf64abf1 (patch) | |
tree | 13a3ad21a732b168399ce9b34bbb0a57784dd54e /libvo/vo_x11.c | |
parent | 1715c2a33632b333f8e8e581ef23ea5fe0234edd (diff) | |
parent | a83e00009000c4907254daa141d491d0479e961d (diff) | |
download | mpv-6cbca28085f1698bc7c6537631d5efbadf64abf1.tar.bz2 mpv-6cbca28085f1698bc7c6537631d5efbadf64abf1.tar.xz |
Merge svn changes up to r27979
Diffstat (limited to 'libvo/vo_x11.c')
-rw-r--r-- | libvo/vo_x11.c | 47 |
1 files changed, 6 insertions, 41 deletions
diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c index 3c8d672734..66c21ebea7 100644 --- a/libvo/vo_x11.c +++ b/libvo/vo_x11.c @@ -303,7 +303,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t format) { // int screen; - int fullscreen = 0; // int interval, prefer_blank, allow_exp, nothing; unsigned int fg, bg; @@ -314,10 +313,12 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, const struct fmt2Xfmtentry_s *fmte = fmt2Xfmt; #ifdef CONFIG_XF86VM - int vm = 0; + int vm = flags & VOFLAG_MODESWITCHING; #endif + int fullscreen = flags & (VOFLAG_FULLSCREEN|VOFLAG_MODESWITCHING); + Flip_Flag = flags & VOFLAG_FLIPPING; + zoomFlag = flags & VOFLAG_SWSCALE; - vo_mouse_autohide = 1; old_vo_dwidth = -1; old_vo_dheight = -1; @@ -329,16 +330,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, srcW = width; srcH = height; - if (flags & (VOFLAG_FULLSCREEN|VOFLAG_MODESWITCHING)) - fullscreen = 1; -#ifdef CONFIG_XF86VM - if (flags & VOFLAG_MODESWITCHING) - vm = 1; -#endif - if (flags & VOFLAG_FLIPPING) - Flip_Flag = 1; - zoomFlag = flags & VOFLAG_SWSCALE; - // if(!fullscreen) zoomFlag=1; //it makes no sense to avoid zooming on windowd mode //printf( "w: %d h: %d\n\n",vo_dwidth,vo_dheight ); @@ -395,36 +386,10 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, } #endif - if (WinID >= 0) - { - vo_window = WinID ? ((Window) WinID) : mRootWin; - if (WinID) - { - XUnmapWindow(mDisplay, vo_window); - XChangeWindowAttributes(mDisplay, vo_window, xswamask, - &xswa); - vo_x11_selectinput_witherr(mDisplay, vo_window, - StructureNotifyMask | - KeyPressMask | - PropertyChangeMask | - PointerMotionMask | - ButtonPressMask | - ButtonReleaseMask | - ExposureMask); - XMapWindow(mDisplay, vo_window); - depth = vo_x11_update_geometry(); - } else - XSelectInput(mDisplay, vo_window, ExposureMask); - } else - { vo_x11_create_vo_window(&vinfo, vo_dx, vo_dy, vo_dwidth, vo_dheight, flags, theCmap, "x11", title); - } - - if (vo_gc != None) - XFreeGC(mDisplay, vo_gc); - vo_gc = XCreateGC(mDisplay, vo_window, 0L, &xgcv); - XSync(mDisplay, False); + if (WinID > 0) + depth = vo_x11_update_geometry(); #ifdef CONFIG_XF86VM if (vm) |