diff options
author | Dudemanguy <random342@airmail.cc> | 2021-08-07 20:10:56 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2021-08-12 19:35:40 +0000 |
commit | f4ceea9b8ae9934c47b9a463730cb09380afb094 (patch) | |
tree | fb4ec46a63b8e4d2e9f57c173e7f8b40730a09f7 /video/out/x11_common.c | |
parent | b692c6599a6e3a7331f588a5a1457788ef9b4e75 (diff) | |
download | mpv-f4ceea9b8ae9934c47b9a463730cb09380afb094.tar.bz2 mpv-f4ceea9b8ae9934c47b9a463730cb09380afb094.tar.xz |
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.
Diffstat (limited to 'video/out/x11_common.c')
-rw-r--r-- | video/out/x11_common.c | 6 |
1 files changed, 6 insertions, 0 deletions
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; |