From 4145406fae437dce2f0af6e078e35566634f2c19 Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Mon, 12 Oct 2026 15:14:41 +0300 Subject: perf: unify platform-independent state, branchless queue masking and native handle caching --- src/wayland/surface.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/wayland/surface.c') diff --git a/src/wayland/surface.c b/src/wayland/surface.c index 8a2bb5b..ca9db72 100644 --- a/src/wayland/surface.c +++ b/src/wayland/surface.c @@ -252,6 +252,7 @@ struct wayland_display *wayland_display_open(struct yasl_loop *loop, const struc c->xkb_ctx = xkb_context_new(XKB_CONTEXT_NO_FLAGS); c->wl = c->xkb_ctx ? wl_display_connect(NULL) : NULL; if (!c->wl) goto err; + c->base.native_handle = c->wl; c->registry = wl_display_get_registry(c->wl); if (!c->registry) goto err; @@ -354,6 +355,9 @@ struct wayland_surface *wayland_surface_create_toplevel(struct wayland_display * w->surface = wl_compositor_create_surface(c->compositor); if (!w->surface) goto err; + w->base.native_handle = w->surface; + w->base.size = (struct yasl_vector2i){width, height}; + w->base.scale_120 = YASL_SCALE_UNIT; wl_surface_set_user_data(w->surface, w); if (surface_init_scaling(w) < 0) goto err; if (surface_init_shell(w, spec->title) < 0) goto err; -- cgit v1.2.3