Skip to content

Commit 2e83b3b

Browse files
committed
wayland: don't always use surface local coordinates in toplevel config
Since 1301fdb we try to directly use surface local coordinates however it is valid for compositors to send us 0s in either the width or height. In that case, it means mpv should choose its geometry so we should calculate out our own coordinates. Previously this was incidentally handled, but we should be more explicit here and set the bool.
1 parent adff00c commit 2e83b3b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

video/out/wayland_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1936,7 +1936,7 @@ static void handle_toplevel_config(void *data, struct xdg_toplevel *toplevel,
19361936
mp_rect_w(wl->geometry), mp_rect_h(wl->geometry));
19371937

19381938
wl->pending_vo_events |= VO_EVENT_RESIZE;
1939-
wl->override_surface_local = false;
1939+
wl->override_surface_local = width == 0 || height == 0;
19401940
wl->toplevel_configured = true;
19411941
}
19421942

0 commit comments

Comments
 (0)