From 9ed89c17dee752154c36d71cae93d20cccfc71ef Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Mon, 12 Oct 2026 14:27:51 +0300 Subject: perf: optimize hot-path loops, data structures, and cache locality --- src/wayland/popup.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/wayland/popup.c') diff --git a/src/wayland/popup.c b/src/wayland/popup.c index 63bcba6..4364934 100644 --- a/src/wayland/popup.c +++ b/src/wayland/popup.c @@ -145,7 +145,10 @@ struct wayland_surface *wayland_surface_create_popup(struct wayland_surface *par w->clock.refresh_ns = parent->clock.refresh_ns; w->surface = wl_compositor_create_surface(c->compositor); - if (!w->surface || surface_init_scaling(w) < 0) + if (!w->surface) + goto err; + wl_surface_set_user_data(w->surface, w); + if (surface_init_scaling(w) < 0) goto err; w->xdg_surface = xdg_wm_base_get_xdg_surface(c->wm_base, w->surface); if (!w->xdg_surface) -- cgit v1.2.3