From 905029ec0c89b638792a429263bb6033eb074570 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 11 Jan 2014 18:50:02 +0100 Subject: video/out: remove pointless x/y parameter from vo_x11_config_vo_window This never made any real sense; the "backend" has to access vo->dx/dy anyway. --- video/out/gl_x11.c | 6 ++---- video/out/vo_vaapi.c | 3 +-- video/out/vo_vdpau.c | 3 +-- video/out/vo_x11.c | 3 +-- video/out/vo_xv.c | 3 +-- video/out/x11_common.c | 4 +++- video/out/x11_common.h | 3 +-- 7 files changed, 10 insertions(+), 15 deletions(-) (limited to 'video') diff --git a/video/out/gl_x11.c b/video/out/gl_x11.c index a4ade18bca..88b586ce2d 100644 --- a/video/out/gl_x11.c +++ b/video/out/gl_x11.c @@ -201,8 +201,7 @@ static bool config_window_x11(struct MPGLContext *ctx, uint32_t d_width, if (glx_ctx->context) { // GL context and window already exist. // Only update window geometry etc. - vo_x11_config_vo_window(vo, glx_ctx->vinfo, vo->dx, vo->dy, d_width, - d_height, flags, "gl"); + vo_x11_config_vo_window(vo, glx_ctx->vinfo, d_width, d_height, flags, "gl"); return true; } @@ -265,8 +264,7 @@ static bool config_window_x11(struct MPGLContext *ctx, uint32_t d_width, glXGetFBConfigAttrib(vo->x11->display, fbc, GLX_GREEN_SIZE, &ctx->depth_g); glXGetFBConfigAttrib(vo->x11->display, fbc, GLX_BLUE_SIZE, &ctx->depth_b); - vo_x11_config_vo_window(vo, glx_ctx->vinfo, vo->dx, vo->dy, d_width, - d_height, flags, "gl"); + vo_x11_config_vo_window(vo, glx_ctx->vinfo, d_width, d_height, flags, "gl"); bool success = false; if (ctx->requested_gl_version >= MPGL_VER(3, 0)) diff --git a/video/out/vo_vaapi.c b/video/out/vo_vaapi.c index d05b4afd44..cd2768a3ea 100644 --- a/video/out/vo_vaapi.c +++ b/video/out/vo_vaapi.c @@ -157,8 +157,7 @@ static int reconfig(struct vo *vo, struct mp_image_params *params, int flags) free_video_specific(p); - vo_x11_config_vo_window(vo, NULL, vo->dx, vo->dy, vo->dwidth, vo->dheight, - flags, "vaapi"); + vo_x11_config_vo_window(vo, NULL, vo->dwidth, vo->dheight, flags, "vaapi"); if (params->imgfmt != IMGFMT_VAAPI) { if (!alloc_swdec_surfaces(p, params->w, params->h, params->imgfmt)) diff --git a/video/out/vo_vdpau.c b/video/out/vo_vdpau.c index 43e21209da..5a0d11206a 100644 --- a/video/out/vo_vdpau.c +++ b/video/out/vo_vdpau.c @@ -801,8 +801,7 @@ static int config(struct vo *vo, uint32_t width, uint32_t height, free_video_specific(vo); - vo_x11_config_vo_window(vo, NULL, vo->dx, vo->dy, d_width, d_height, - flags, "vdpau"); + vo_x11_config_vo_window(vo, NULL, d_width, d_height, flags, "vdpau"); if (initialize_vdpau_objects(vo) < 0) return -1; diff --git a/video/out/vo_x11.c b/video/out/vo_x11.c index b7bd64b0a5..8240f55b25 100644 --- a/video/out/vo_x11.c +++ b/video/out/vo_x11.c @@ -308,8 +308,7 @@ static int reconfig(struct vo *vo, struct mp_image_params *fmt, int flags) TrueColor, &p->vinfo)) return -1; - vo_x11_config_vo_window(vo, &p->vinfo, vo->dx, vo->dy, vo->dwidth, - vo->dheight, flags, "x11"); + vo_x11_config_vo_window(vo, &p->vinfo, vo->dwidth, vo->dheight, flags, "x11"); if (!resize(vo)) return -1; diff --git a/video/out/vo_xv.c b/video/out/vo_xv.c index 43a98a7068..046dc21d85 100644 --- a/video/out/vo_xv.c +++ b/video/out/vo_xv.c @@ -455,8 +455,7 @@ static int config(struct vo *vo, uint32_t width, uint32_t height, if (!ctx->xv_format) return -1; - vo_x11_config_vo_window(vo, NULL, vo->dx, vo->dy, vo->dwidth, - vo->dheight, flags, "xv"); + vo_x11_config_vo_window(vo, NULL, vo->dwidth, vo->dheight, flags, "xv"); if (ctx->xv_ck_info.method == CK_METHOD_BACKGROUND) XSetWindowBackground(x11->display, x11->window, ctx->xv_colorkey); diff --git a/video/out/x11_common.c b/video/out/x11_common.c index 8bdc845523..5fa0c54d23 100644 --- a/video/out/x11_common.c +++ b/video/out/x11_common.c @@ -1335,12 +1335,14 @@ static void vo_x11_highlevel_resize(struct vo *vo, int x, int y, int w, int h) * * If the window already exists, it just moves and resizes it. */ -void vo_x11_config_vo_window(struct vo *vo, XVisualInfo *vis, int x, int y, +void vo_x11_config_vo_window(struct vo *vo, XVisualInfo *vis, unsigned int width, unsigned int height, int flags, const char *classname) { struct mp_vo_opts *opts = vo->opts; struct vo_x11_state *x11 = vo->x11; + int x = vo->dx; + int y = vo->dy; if (opts->WinID >= 0) { if (opts->WinID == 0) diff --git a/video/out/x11_common.h b/video/out/x11_common.h index f65af8e79f..ac41f6e3ed 100644 --- a/video/out/x11_common.h +++ b/video/out/x11_common.h @@ -144,8 +144,7 @@ int vo_x11_check_events(struct vo *vo); bool vo_x11_screen_is_composited(struct vo *vo); void fstype_help(struct mp_log *log); void vo_x11_config_vo_window(struct vo *vo, XVisualInfo *vis, - int x, int y, unsigned int width, - unsigned int height, int flags, + unsigned int width, unsigned int height, int flags, const char *classname); void vo_x11_clear_background(struct vo *vo, const struct mp_rect *rc); void vo_x11_clearwindow(struct vo *vo, Window vo_window); -- cgit v1.2.3