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.
This commit is contained in:
Dudemanguy 2024-03-19 10:09:21 -05:00
parent dc9da5d463
commit 4d80e7b72c
1 changed files with 2 additions and 2 deletions

View File

@ -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);