summaryrefslogtreecommitdiffstats
path: root/libvo/vo_xvidix.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-11-19 20:19:25 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-11-19 20:19:25 +0000
commitc351d29392df4d69c7beae0ba41878e6335e3614 (patch)
tree3ddfa5ab9beca381a36da9384c750eb0832a5983 /libvo/vo_xvidix.c
parent928e4433aa62badaa8578cf8247ea0cbf06e3204 (diff)
downloadmpv-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_xvidix.c')
-rw-r--r--libvo/vo_xvidix.c37
1 files changed, 2 insertions, 35 deletions
diff --git a/libvo/vo_xvidix.c b/libvo/vo_xvidix.c
index 19fc047437..9dc0e62f52 100644
--- a/libvo/vo_xvidix.c
+++ b/libvo/vo_xvidix.c
@@ -49,7 +49,6 @@ LIBVO_EXTERN(xvidix)
#define UNUSED(x) ((void)(x)) /* Removes warning about unused arguments */
/* X11 related variables */
/* Colorkey handling */
-static XGCValues mGCV;
static int colorkey;
static vidix_grkey_t gr_key;
@@ -205,7 +204,6 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
image_height = height;
image_width = width;
image_format = format;
- vo_mouse_autohide = 1;
window_width = d_width;
window_height = d_height;
@@ -268,44 +266,13 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
xswa.colormap =
XCreateColormap(mDisplay, RootWindow(mDisplay, mScreen),
vinfo.visual, AllocNone);
- xswa.event_mask =
- StructureNotifyMask | ExposureMask | KeyPressMask |
- PropertyChangeMask | ((WinID == 0) ? 0
- : (ButtonPressMask | ButtonReleaseMask |
- PointerMotionMask));
- xswamask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask;
-
- if (WinID >= 0)
- {
- vo_window =
- WinID ? ((Window) WinID) : RootWindow(mDisplay, mScreen);
- 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);
- } else
- XSelectInput(mDisplay, vo_window, ExposureMask);
- } else
- {
+ xswamask = CWBackPixel | CWBorderPixel | CWColormap;
+
vo_x11_create_vo_window(&vinfo, vo_dx, vo_dy,
window_width, window_height, flags,
CopyFromParent, "xvidix", title);
XChangeWindowAttributes(mDisplay, vo_window, xswamask, &xswa);
- }
- if (vo_gc != None)
- XFreeGC(mDisplay, vo_gc);
- vo_gc = XCreateGC(mDisplay, vo_window, GCForeground, &mGCV);
#ifdef CONFIG_GUI
}
#endif