diff --git a/video/out/vo_dmabuf_wayland.c b/video/out/vo_dmabuf_wayland.c index 35a4dac464..2e3154fc27 100644 --- a/video/out/vo_dmabuf_wayland.c +++ b/video/out/vo_dmabuf_wayland.c @@ -537,10 +537,10 @@ static void resize(struct vo *vo) vo_get_src_dst_rects(vo, &src, &dst, &p->screen_osd_res); wp_viewport_set_destination(wl->video_viewport, lround(mp_rect_w(dst) / wl->scaling), lround(mp_rect_h(dst) / wl->scaling)); - wl_subsurface_set_position(wl->video_subsurface, dst.x0, dst.y0); + wl_subsurface_set_position(wl->video_subsurface, lround(dst.x0 / wl->scaling), lround(dst.y0 / wl->scaling)); wp_viewport_set_destination(wl->osd_viewport, lround(vo->dwidth / wl->scaling), lround(vo->dheight / wl->scaling)); - wl_subsurface_set_position(wl->osd_subsurface, 0 - dst.x0, 0 - dst.y0); + wl_subsurface_set_position(wl->osd_subsurface, lround((0 - dst.x0) / wl->scaling), lround((0 - dst.y0) / wl->scaling)); set_viewport_source(vo, src); }