diff options
| author | Berke Güzel <wenekar1@gmail.com> | 2026-10-12 15:14:41 +0300 |
|---|---|---|
| committer | Berke Güzel <wenekar1@gmail.com> | 2026-10-12 15:14:41 +0300 |
| commit | 4145406fae437dce2f0af6e078e35566634f2c19 (patch) | |
| tree | 689e3ab0e0033fc47be0b2d590b864692c936dcc /src/wayland/surface.c | |
| parent | 5d1eaf3beffd3653fc4c26b0557c77026bbd6bfc (diff) | |
perf: unify platform-independent state, branchless queue masking and native handle caching
Diffstat (limited to 'src/wayland/surface.c')
| -rw-r--r-- | src/wayland/surface.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; |
