1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-22 14:52:43 +00:00

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.)
This commit is contained in:
wm4 2014-10-13 09:57:31 +02:00
parent 385e1ccbce
commit 7266ceeb8e

View File

@ -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: