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

@ -161,8 +161,8 @@ show_menu(struct server *server, struct view *view, const char *menu_name)
if (!view) {
return;
}
enum ssd_part_type type = ssd_at(view, server->seat.cursor->x,
server->seat.cursor->y);
enum ssd_part_type type = ssd_at(&view->ssd, server->scene,
server->seat.cursor->x, server->seat.cursor->y);
if (type == LAB_SSD_BUTTON_WINDOW_MENU) {
force_menu_top_left = true;
} else if (ssd_part_contains(LAB_SSD_PART_TITLEBAR, type)) {