summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2024-03-19 10:09:21 -0500
committerDudemanguy <random342@airmail.cc>2024-04-18 17:40:16 +0000
commit4d80e7b72c0a4094f918779359fcce38eb796c40 (patch)
treedd11d248a619032995b2e54ec032d4bf51066ac6 /video
parentdc9da5d46367ab4ffd430a0afd92f9533c69494f (diff)
downloadmpv-4d80e7b72c0a4094f918779359fcce38eb796c40.tar.bz2
mpv-4d80e7b72c0a4094f918779359fcce38eb796c40.tar.xz
x11: always do a reset_size if geometry/autofit is updated at runtime
Previously, the code required a check against the old saved geometry to make sure the size and/or position was different before updating. The doesn't work with the previous changes that allow a geometry value to be set again with the same value as before. It would probably be nicer to check against something that always keeps track of the actual window size in real time, but it seems geometry in x11 doesn't quite work that way so we'll do it the easier way instead.
Diffstat (limited to 'video')
-rw-r--r--video/out/x11_common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c
index a483186bdc..6082567901 100644
--- a/video/out/x11_common.c
+++ b/video/out/x11_common.c
@@ -1812,8 +1812,8 @@ void vo_x11_config_vo_window(struct vo *vo)
rc = (struct mp_rect){0, 0, RC_W(x11->winrc), RC_H(x11->winrc)};
}
- bool reset_size = (x11->old_dw != RC_W(rc) || x11->old_dh != RC_H(rc)) &&
- (opts->auto_window_resize || x11->geometry_change);
+ bool reset_size = ((x11->old_dw != RC_W(rc) || x11->old_dh != RC_H(rc))
+ && opts->auto_window_resize) || x11->geometry_change;
reset_size |= (x11->old_x != rc.x0 || x11->old_y != rc.y0) &&
(x11->geometry_change);