From b695ca1e27240581e01818f9ce7bf1dec95634d6 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 2 Feb 2014 03:19:22 +0100 Subject: x11: fix initial VO size This was done incorrectly in the previous commit: the fallback size used the window size as requested with the first config call, which is the size of the hidden window in the vo_opengl case. (That damn hidden window again...) Conflicts: video/out/x11_common.c --- video/out/x11_common.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/video/out/x11_common.c b/video/out/x11_common.c index 378ccbc508..b9245d73c6 100644 --- a/video/out/x11_common.c +++ b/video/out/x11_common.c @@ -1123,12 +1123,6 @@ static void vo_x11_create_window(struct vo *vo, XVisualInfo *vis, int x, int y, vo_x11_set_wm_icon(x11); vo_x11_update_window_title(vo); - - // The real size is only known when the window is mapped, which - // unfortunately happens asynchronous to VO initialization. At least - // vdpau needs a _some_ window size, though. - x11->win_width = w; - x11->win_height = h; } static void vo_x11_map_window(struct vo *vo, int x, int y, int w, int h) @@ -1229,6 +1223,13 @@ void vo_x11_config_vo_window(struct vo *vo, XVisualInfo *vis, int x, int y, XSync(x11->display, False); vo_x11_update_geometry(vo); + if (x11->window_hidden) { + // The real size is only known when the window is mapped, which + // unfortunately happens asynchronous to VO initialization. At least + // vdpau needs a _some_ window size, though. + x11->win_width = width; + x11->win_height = height; + } update_vo_size(vo); x11->pending_vo_events &= ~VO_EVENT_RESIZE; // implicitly done by the VO } -- cgit v1.2.3