summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-10-13 09:57:31 +0200
committerwm4 <wm4@nowhere>2014-10-13 09:57:31 +0200
commit7266ceeb8e0ad5f66991ebfa7caa0dff235481ef (patch)
tree01eb58b9b00915d9c1b2f6ffc8ac610c9f584aaf /video/out
parent385e1ccbce6b43c52614345e6f2e7dda6cdcd108 (diff)
downloadmpv-7266ceeb8e0ad5f66991ebfa7caa0dff235481ef.tar.bz2
mpv-7266ceeb8e0ad5f66991ebfa7caa0dff235481ef.tar.xz
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.)
Diffstat (limited to 'video/out')
-rw-r--r--video/out/x11_common.c7
1 files 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: