summaryrefslogtreecommitdiffstats
path: root/video/out/x11_common.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-04-15 21:18:46 +0200
committerwm4 <wm4@nowhere>2013-04-21 00:39:54 +0200
commit465ccd2c93079fa1dd9e0d8b211eb5481bf95dd7 (patch)
tree464cd948306f950111b5ffa15674be553462fa39 /video/out/x11_common.c
parent1bae5641ab21c0f15572dc016a8deef2a32d15b5 (diff)
downloadmpv-465ccd2c93079fa1dd9e0d8b211eb5481bf95dd7.tar.bz2
mpv-465ccd2c93079fa1dd9e0d8b211eb5481bf95dd7.tar.xz
x11_common: minor simplification
Diffstat (limited to 'video/out/x11_common.c')
-rw-r--r--video/out/x11_common.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c
index c6741f2662..a08f95d822 100644
--- a/video/out/x11_common.c
+++ b/video/out/x11_common.c
@@ -924,16 +924,6 @@ static void vo_x11_update_window_title(struct vo *vo)
vo_x11_set_property_utf8(vo, x11->XA_NET_WM_ICON_NAME, title);
}
-static void setup_window_params(struct vo_x11_state *x11, XVisualInfo *vis,
- unsigned long *mask, XSetWindowAttributes *att)
-{
- vo_x11_create_colormap(x11, vis);
-
- *mask = CWBorderPixel | CWColormap;
- att->border_pixel = 0;
- att->colormap = x11->colormap;
-}
-
static void find_default_visual(struct vo_x11_state *x11, XVisualInfo *vis)
{
Display *display = x11->display;
@@ -956,9 +946,12 @@ static void vo_x11_create_window(struct vo *vo, XVisualInfo *vis, int x, int y,
find_default_visual(x11, vis);
}
- unsigned long xswamask;
- XSetWindowAttributes xswa;
- setup_window_params(x11, vis, &xswamask, &xswa);
+ vo_x11_create_colormap(x11, vis);
+ unsigned long xswamask = CWBorderPixel | CWColormap;
+ XSetWindowAttributes xswa = {
+ .border_pixel = 0,
+ .colormap = x11->colormap,
+ };
Window parent = vo->opts->WinID >= 0 ? vo->opts->WinID : x11->rootwin;