From e337927085aa4681a1c89b6899af83e0ff3699db Mon Sep 17 00:00:00 2001 From: Adam Livesley Date: Fri, 8 Mar 2024 09:26:24 +0000 Subject: [PATCH] vulkan/context: trigger VO_EVENT_RESIZE on layer change --- video/out/vulkan/context_moltenvk.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/video/out/vulkan/context_moltenvk.m b/video/out/vulkan/context_moltenvk.m index 5124280bb2309..34d47bb7db7b9 100644 --- a/video/out/vulkan/context_moltenvk.m +++ b/video/out/vulkan/context_moltenvk.m @@ -21,6 +21,7 @@ #include "common.h" #include "context.h" +#include "video/out/vo.h" #include "utils.h" static bool moltenvk_reconfig(struct ra_ctx *ctx); @@ -40,7 +41,10 @@ - (id)initWithContext: (struct ra_ctx*) ctx - (void)layoutSublayersOfLayer: (CALayer*) layer { - moltenvk_reconfig(_ra_ctx); + CGSize s = _ra_ctx->layer.drawableSize; + _ra_ctx->vo->dwidth = s.width; + _ra_ctx->vo->dheight = s.height; + vo_event(_ra_ctx->vo, VO_EVENT_RESIZE | VO_EVENT_EXPOSE); } @end