ssd: Allocate struct ssd and struct ssd_hover_state separately

- Store a pointer to the `struct view` in `struct ssd`
- Pass `struct ssd *` instead of `struct view *` to ssd functions
- Add `ssd_get_margin()` convenience function
This commit is contained in:
John Lindgren 2022-11-26 16:46:28 -05:00 committed by Johan Malm
parent cfa51ab628
commit 1e8b0414fe
15 changed files with 112 additions and 65 deletions

View file

@ -339,7 +339,7 @@ get_cursor_context(struct server *server)
case LAB_NODE_DESC_VIEW:
case LAB_NODE_DESC_XDG_POPUP:
ret.view = desc->data;
ret.type = ssd_get_part_type(&ret.view->ssd, ret.node);
ret.type = ssd_get_part_type(ret.view->ssd, ret.node);
if (ret.type == LAB_SSD_CLIENT) {
ret.surface = lab_wlr_surface_from_node(ret.node);
}