From c351d29392df4d69c7beae0ba41878e6335e3614 Mon Sep 17 00:00:00 2001 From: reimar Date: Wed, 19 Nov 2008 20:19:25 +0000 Subject: 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 --- libvo/vo_xmga.c | 39 ++------------------------------------- 1 file changed, 2 insertions(+), 37 deletions(-) (limited to 'libvo/vo_xmga.c') diff --git a/libvo/vo_xmga.c b/libvo/vo_xmga.c index 96d400866b..6ac295af0e 100644 --- a/libvo/vo_xmga.c +++ b/libvo/vo_xmga.c @@ -55,7 +55,6 @@ static const vo_info_t info = { }; const LIBVO_EXTERN(xmga) -static XGCValues wGCV; static uint32_t mDepth; static XWindowAttributes attribs; @@ -142,7 +141,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, vo_dy += xinerama_y; vo_dwidth = d_width; vo_dheight = d_height; - vo_mouse_autohide = 1; r = (vo_colorkey & 0x00ff0000) >> 16; g = (vo_colorkey & 0x0000ff00) >> 8; @@ -189,44 +187,11 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, XCreateColormap(mDisplay, mRootWin, vinfo.visual, AllocNone); xWAttribs.background_pixel = 0; xWAttribs.border_pixel = 0; - xWAttribs.event_mask = - StructureNotifyMask | ExposureMask | KeyPressMask | - ((WinID == - 0) ? 0 : (ButtonPressMask | ButtonReleaseMask | - PointerMotionMask | PropertyChangeMask)); - xswamask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask; - - if (WinID >= 0) - { - - vo_window = WinID ? ((Window) WinID) : mRootWin; - if (WinID) - { - XUnmapWindow(mDisplay, vo_window); - XChangeWindowAttributes(mDisplay, vo_window, xswamask, - &xWAttribs); - vo_x11_selectinput_witherr(mDisplay, vo_window, - StructureNotifyMask | - KeyPressMask | - PropertyChangeMask | - PointerMotionMask | - ButtonPressMask | - ButtonReleaseMask | - ExposureMask); - XMapWindow(mDisplay, vo_window); - } else - XSelectInput(mDisplay, vo_window, ExposureMask); - - } else - { + xswamask = CWBackPixel | CWBorderPixel | CWColormap; + vo_x11_create_vo_window(&vinfo, vo_dx, vo_dy, d_width, d_height, flags, xWAttribs.colormap, "xmga", title); XChangeWindowAttributes(mDisplay, vo_window, xswamask, &xWAttribs); - } - - if (vo_gc != None) - XFreeGC(mDisplay, vo_gc); - vo_gc = XCreateGC(mDisplay, vo_window, GCForeground, &wGCV); } // !GUI -- cgit v1.2.3