mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
Fix resize issues with some xdg-shell apps.
Also renames view_get_size to view_get_box to be more consistent with wlroots API and make it more obvious that x,y are set (while in roots_view.get_size this isn't the case). Fixes #407
This commit is contained in:
parent
698a172701
commit
eb89f1dcd2
4 changed files with 22 additions and 16 deletions
|
|
@ -13,8 +13,14 @@
|
|||
static void get_size(const struct roots_view *view, struct wlr_box *box) {
|
||||
assert(view->type == ROOTS_XDG_SHELL_V6_VIEW);
|
||||
struct wlr_xdg_surface_v6 *surf = view->xdg_surface_v6;
|
||||
// TODO: surf->geometry can be NULL
|
||||
memcpy(box, surf->geometry, sizeof(struct wlr_box));
|
||||
|
||||
if (surf->geometry->width > 0 && surf->geometry->height > 0) {
|
||||
box->width = surf->geometry->width;
|
||||
box->height = surf->geometry->height;
|
||||
} else {
|
||||
box->width = view->wlr_surface->current->width;
|
||||
box->height = view->wlr_surface->current->height;
|
||||
}
|
||||
}
|
||||
|
||||
static void activate(struct roots_view *view, bool active) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue