summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
Diffstat (limited to 'video/out')
-rw-r--r--video/out/opengl/context_wayland.c2
-rw-r--r--video/out/vulkan/context_wayland.c1
-rw-r--r--video/out/wayland_common.c2
3 files changed, 2 insertions, 3 deletions
diff --git a/video/out/opengl/context_wayland.c b/video/out/opengl/context_wayland.c
index 713ea8a36f..b402ca9055 100644
--- a/video/out/opengl/context_wayland.c
+++ b/video/out/opengl/context_wayland.c
@@ -47,8 +47,6 @@ static void resize(struct ra_ctx *ctx)
const int32_t height = wl->scaling * mp_rect_h(wl->geometry);
vo_wayland_set_opaque_region(wl, ctx->opts.want_alpha);
- wl_surface_set_buffer_scale(wl->surface, wl->scaling);
-
if (p->egl_window)
wl_egl_window_resize(p->egl_window, width, height, 0, 0);
diff --git a/video/out/vulkan/context_wayland.c b/video/out/vulkan/context_wayland.c
index 6097fa5a19..d2e6309776 100644
--- a/video/out/vulkan/context_wayland.c
+++ b/video/out/vulkan/context_wayland.c
@@ -124,7 +124,6 @@ static bool resize(struct ra_ctx *ctx)
const int32_t height = wl->scaling * mp_rect_h(wl->geometry);
vo_wayland_set_opaque_region(wl, ctx->opts.want_alpha);
- wl_surface_set_buffer_scale(wl->surface, wl->scaling);
return ra_vk_ctx_resize(ctx, width, height);
}
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c
index 3e0ed8bbec..13cdf5f2f8 100644
--- a/video/out/wayland_common.c
+++ b/video/out/wayland_common.c
@@ -653,6 +653,7 @@ static void output_handle_done(void* data, struct wl_output *wl_output)
* geometry and scaling should be recalculated. */
if (wl->current_output && wl->current_output->output == wl_output) {
wl->scaling = wl->current_output->scale;
+ wl_surface_set_buffer_scale(wl->surface, wl->scaling);
spawn_cursor(wl);
set_geometry(wl);
wl->window_size = wl->vdparams;
@@ -711,6 +712,7 @@ static void surface_handle_enter(void *data, struct wl_surface *wl_surface,
if (wl->scaling != wl->current_output->scale && wl->vo_opts->hidpi_window_scale) {
double factor = (double)wl->scaling / wl->current_output->scale;
wl->scaling = wl->current_output->scale;
+ wl_surface_set_buffer_scale(wl->surface, wl->scaling);
spawn_cursor(wl);
rescale_geometry_dimensions(wl, factor);
wl->pending_vo_events |= VO_EVENT_DPI;