summaryrefslogtreecommitdiff
path: root/src/wayland/surface.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/wayland/surface.c')
-rw-r--r--src/wayland/surface.c4
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;