From f4ceea9b8ae9934c47b9a463730cb09380afb094 Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Sat, 7 Aug 2021 20:10:56 -0500 Subject: x11: handle maximized windows with window-scale If a user attempted to change the window scale of a maximized window on x11, nothing would happen since the window manager holds the size of the window constant. Just do an unmaximize first before performing the resize. --- video/out/x11_common.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/video/out/x11_common.c b/video/out/x11_common.c index 12d2648d4e..2e685e2297 100644 --- a/video/out/x11_common.c +++ b/video/out/x11_common.c @@ -1912,6 +1912,12 @@ int vo_x11_control(struct vo *vo, int *events, int request, void *arg) struct mp_rect rc = x11->winrc; rc.x1 = rc.x0 + w; rc.y1 = rc.y0 + h; + if (x11->opts->window_maximized) { + x11->opts->window_maximized = false; + m_config_cache_write_opt(x11->opts_cache, + &x11->opts->window_maximized); + vo_x11_maximize(vo); + } vo_x11_highlevel_resize(vo, rc); if (!x11->fs) { // guess new window size, instead of waiting for X x11->winrc.x1 = x11->winrc.x0 + w; -- cgit v1.2.3