summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-02-02 03:19:22 +0100
committerwm4 <wm4@nowhere>2014-02-02 03:19:36 +0100
commitc8b754e38fea1ca9eb39a33c6c55793118ba121f (patch)
tree5ae77cea4cac5e7bc6f94389d8b06c89da7fc43d /video
parentb57a0a0bc6e9855d1fa51f0e9fdc5e67adf33612 (diff)
downloadmpv-c8b754e38fea1ca9eb39a33c6c55793118ba121f.tar.bz2
mpv-c8b754e38fea1ca9eb39a33c6c55793118ba121f.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...)
Diffstat (limited to 'video')
-rw-r--r--video/out/x11_common.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c
index 71ef39a3b0..ebe0c40f4a 100644
--- a/video/out/x11_common.c
+++ b/video/out/x11_common.c
@@ -1269,12 +1269,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);
vo_x11_dnd_init_window(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)
@@ -1377,6 +1371,13 @@ void vo_x11_config_vo_window(struct vo *vo, XVisualInfo *vis,
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
}