ssd: Cosmetic cleanups

- Minimize includes in `ssd.h`
- Avoid repetitive `view->ssd.margin` pattern
- Use `struct ssd *` or `const struct ssd *` rather than `struct view *`
  where convenient

Part of the motivation is to make it easier to separate `struct ssd`
from `struct view` in a future commit.
This commit is contained in:
John Lindgren 2022-11-26 16:06:22 -05:00 committed by Johan Malm
parent 9dd55f0490
commit 957d9e5926
9 changed files with 163 additions and 145 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, 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);
}