summaryrefslogtreecommitdiff
path: root/src/wayland/popup.c
diff options
context:
space:
mode:
authorBerke Güzel <wenekar1@gmail.com>2026-10-12 14:27:51 +0300
committerBerke Güzel <wenekar1@gmail.com>2026-10-12 14:27:51 +0300
commit9ed89c17dee752154c36d71cae93d20cccfc71ef (patch)
treea32cd894643ff6f6ebce83dd745bd24b35eb6520 /src/wayland/popup.c
parentaedd863e6f66fd446227e9b107bc9c1970092634 (diff)
perf: optimize hot-path loops, data structures, and cache locality
Diffstat (limited to 'src/wayland/popup.c')
-rw-r--r--src/wayland/popup.c5
1 files changed, 4 insertions, 1 deletions
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)