summaryrefslogtreecommitdiffstats
path: root/video/out/vulkan/context_wayland.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/vulkan/context_wayland.c')
-rw-r--r--video/out/vulkan/context_wayland.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/video/out/vulkan/context_wayland.c b/video/out/vulkan/context_wayland.c
index 481c1005e1..753854381c 100644
--- a/video/out/vulkan/context_wayland.c
+++ b/video/out/vulkan/context_wayland.c
@@ -208,6 +208,13 @@ static bool resize(struct ra_ctx *ctx)
const int32_t width = wl->scaling*mp_rect_w(wl->geometry);
const int32_t height = wl->scaling*mp_rect_h(wl->geometry);
+ if (!ctx->opts.want_alpha) {
+ struct wl_region *region = wl_compositor_create_region(wl->compositor);
+ wl_region_add(region, 0, 0, width, height);
+ wl_surface_set_opaque_region(wl->surface, region);
+ wl_region_destroy(region);
+ }
+
wl_surface_set_buffer_scale(wl->surface, wl->scaling);
bool ok = ra_vk_ctx_resize(ctx, width, height);
if (!wl->vo_opts->fullscreen && !wl->vo_opts->window_maximized)