mirror of
https://github.com/cage-kiosk/cage.git
synced 2025-11-16 06:59:49 -05:00
view: adjust position according to declared top left corner
This commit is contained in:
parent
560e9ff3ef
commit
44fb937f8e
4 changed files with 22 additions and 18 deletions
14
xwayland.c
14
xwayland.c
|
|
@ -38,18 +38,22 @@ get_title(struct cg_view *view)
|
|||
}
|
||||
|
||||
static void
|
||||
get_geometry(struct cg_view *view, int *width_out, int *height_out)
|
||||
get_geometry(struct cg_view *view, struct wlr_box *view_box)
|
||||
{
|
||||
struct cg_xwayland_view *xwayland_view = xwayland_view_from_view(view);
|
||||
struct wlr_xwayland_surface *xsurface = xwayland_view->xwayland_surface;
|
||||
|
||||
view_box->x = 0;
|
||||
view_box->y = 0;
|
||||
|
||||
if (xsurface->surface == NULL) {
|
||||
*width_out = 0;
|
||||
*height_out = 0;
|
||||
view_box->width = 0;
|
||||
view_box->height = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
*width_out = xsurface->surface->current.width;
|
||||
*height_out = xsurface->surface->current.height;
|
||||
view_box->width = xwayland_view->xwayland_surface->surface->current.width;
|
||||
view_box->height = xwayland_view->xwayland_surface->surface->current.height;
|
||||
}
|
||||
|
||||
static bool
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue