Skip to content

Commit 3e3048a

Browse files
committed
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.
1 parent fd2215e commit 3e3048a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

video/out/wayland_common.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3859,6 +3859,7 @@ static void set_geometry(struct vo_wayland_state *wl, bool resize)
38593859
if (resize) {
38603860
if (!wl->locked_size)
38613861
wl->geometry = wl->window_size;
3862+
wl->reconfigured = true;
38623863
wl->override_surface_local = true;
38633864
wl->pending_vo_events |= VO_EVENT_RESIZE;
38643865
}
@@ -4259,6 +4260,8 @@ int vo_wayland_control(struct vo *vo, int *events, int request, void *arg)
42594260
wl->window_size.y0 = 0;
42604261
wl->window_size.x1 = s[0];
42614262
wl->window_size.y1 = s[1];
4263+
wl->reconfigured = true;
4264+
wl->override_surface_local = true;
42624265
if (!wl->opts->fullscreen && !wl->tiled) {
42634266
if (wl->opts->window_maximized) {
42644267
xdg_toplevel_unset_maximized(wl->xdg_toplevel);
@@ -4268,7 +4271,6 @@ int vo_wayland_control(struct vo *vo, int *events, int request, void *arg)
42684271
return VO_TRUE;
42694272
}
42704273
wl->geometry = wl->window_size;
4271-
wl->override_surface_local = true;
42724274
wl->pending_vo_events |= VO_EVENT_RESIZE;
42734275
}
42744276
return VO_TRUE;

0 commit comments

Comments
 (0)