diff options
author | wm4 <wm4@nowhere> | 2014-02-02 03:19:22 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-02-12 22:31:21 +0100 |
commit | b695ca1e27240581e01818f9ce7bf1dec95634d6 (patch) | |
tree | 596f7c82d522c274acbc48c1c3d0d5526d37036a | |
parent | 801feb642055234a2953237c0a8595fd41fc6d10 (diff) | |
download | mpv-b695ca1e27240581e01818f9ce7bf1dec95634d6.tar.bz2 mpv-b695ca1e27240581e01818f9ce7bf1dec95634d6.tar.xz |
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
-rw-r--r-- | video/out/x11_common.c | 13 |
1 files 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 } |