From 7266ceeb8e0ad5f66991ebfa7caa0dff235481ef Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 13 Oct 2014 09:57:31 +0200 Subject: x11: don't wait for asynchronous X resizing with window-scale Instead of letting the window-scale property return the old value until X11 actually executed the resize, just set the new assumed internal window size immediately. This avoids a "lag" between setting and reading the window-scale property, like OSD controls typically do. Remove the additional calls from vo_x11_highlevel_resize() - they're pointless and slightly wrong, and resize events will take care of updating these things correctly anyway. Fixes #1176. ("window-scale" works via VOCTRL_[S|G]ET_UNFS_WINDOW_SIZE.) --- video/out/x11_common.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/video/out/x11_common.c b/video/out/x11_common.c index b7e57a730a..0ce669df6f 100644 --- a/video/out/x11_common.c +++ b/video/out/x11_common.c @@ -1286,9 +1286,6 @@ static void vo_x11_highlevel_resize(struct vo *vo, struct mp_rect rc) } else { vo_x11_move_resize(vo, reset_pos, true, rc); } - - vo_x11_update_geometry(vo); - update_vo_size(vo); } static void wait_until_mapped(struct vo *vo) @@ -1576,6 +1573,10 @@ int vo_x11_control(struct vo *vo, int *events, int request, void *arg) rc.x1 = rc.x0 + s[0]; rc.y1 = rc.y0 + s[1]; vo_x11_highlevel_resize(vo, rc); + if (!x11->fs) { // guess new window size, instead of waiting for X + x11->winrc.x1 = x11->winrc.x0 + s[0]; + x11->winrc.y1 = x11->winrc.y0 + s[1]; + } return VO_TRUE; } case VOCTRL_SET_CURSOR_VISIBILITY: -- cgit v1.2.3