From 465ccd2c93079fa1dd9e0d8b211eb5481bf95dd7 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 15 Apr 2013 21:18:46 +0200 Subject: x11_common: minor simplification --- video/out/x11_common.c | 19 ++++++------------- 1 file 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; -- cgit v1.2.3