diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-11-19 20:19:25 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-11-19 20:19:25 +0000 |
commit | c351d29392df4d69c7beae0ba41878e6335e3614 (patch) | |
tree | 3ddfa5ab9beca381a36da9384c750eb0832a5983 /libvo/vo_x11.c | |
parent | 928e4433aa62badaa8578cf8247ea0cbf06e3204 (diff) | |
download | mpv-c351d29392df4d69c7beae0ba41878e6335e3614.tar.bz2 mpv-c351d29392df4d69c7beae0ba41878e6335e3614.tar.xz |
Factor common code like -wid handling, vo_gc creation etc. out into
x11_common.c
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27961 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_x11.c')
-rw-r--r-- | libvo/vo_x11.c | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c index bc13e5d601..6f799e38da 100644 --- a/libvo/vo_x11.c +++ b/libvo/vo_x11.c @@ -317,7 +317,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, int vm = 0; #endif - vo_mouse_autohide = 1; old_vo_dwidth = -1; old_vo_dheight = -1; @@ -395,36 +394,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) |