diff options
Diffstat (limited to 'src/wayland')
| -rw-r--r-- | src/wayland/buffer.c | 2 | ||||
| -rw-r--r-- | src/wayland/popup.c | 3 | ||||
| -rw-r--r-- | src/wayland/surface.c | 4 |
3 files changed, 9 insertions, 0 deletions
diff --git a/src/wayland/buffer.c b/src/wayland/buffer.c index 4cddfa5..142f85f 100644 --- a/src/wayland/buffer.c +++ b/src/wayland/buffer.c @@ -174,6 +174,8 @@ int apply_pending_geometry(struct wayland_surface *w) w->scale_factor = (double)w->scale_120 / YASL_SCALE_UNIT; w->width = width; w->height = height; + w->base.size = (struct yasl_vector2i){width, height}; + w->base.scale_120 = w->scale_120; w->logical_width = logical_w; w->logical_height = logical_h; surface_update_opaque_region(w); diff --git a/src/wayland/popup.c b/src/wayland/popup.c index 4364934..3a85435 100644 --- a/src/wayland/popup.c +++ b/src/wayland/popup.c @@ -147,6 +147,9 @@ struct wayland_surface *wayland_surface_create_popup(struct wayland_surface *par 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){spec->size.x, spec->size.y}; + w->base.scale_120 = parent->scale_120; wl_surface_set_user_data(w->surface, w); if (surface_init_scaling(w) < 0) goto err; 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; |
