wayland: override surface local when setting geometry or window scale

If the window is fullscreen or maximized and the user sets some geometry
or window scale, we should apply it when the state transitions back to
windowed mode. This was being missed and the surface local coordinates
were being used.
This commit is contained in:
Dudemanguy committed 2026-04-10 14:00:50 +00:00
1 parent fd2215eef4
commit 3e3048a5aa
1 file changed
+3 -1
+3 -1
View File
@@ -3859,6 +3859,7 @@ static void set_geometry(struct vo_wayland_state *wl, bool resize)
if (resize) {
if (!wl->locked_size)
wl->geometry = wl->window_size;
wl->reconfigured = true;
wl->override_surface_local = true;
wl->pending_vo_events |= VO_EVENT_RESIZE;
}
@@ -4259,6 +4260,8 @@ int vo_wayland_control(struct vo *vo, int *events, int request, void *arg)
wl->window_size.y0 = 0;
wl->window_size.x1 = s[0];
wl->window_size.y1 = s[1];
wl->reconfigured = true;
wl->override_surface_local = true;
if (!wl->opts->fullscreen && !wl->tiled) {
if (wl->opts->window_maximized) {
xdg_toplevel_unset_maximized(wl->xdg_toplevel);
@@ -4268,7 +4271,6 @@ int vo_wayland_control(struct vo *vo, int *events, int request, void *arg)
return VO_TRUE;
}
wl->geometry = wl->window_size;
wl->override_surface_local = true;
wl->pending_vo_events |= VO_EVENT_RESIZE;
}
return VO_TRUE;