mirror of
https://github.com/labwc/labwc.git
synced 2025-11-02 09:01:47 -05:00
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:
parent
cfa51ab628
commit
1e8b0414fe
15 changed files with 112 additions and 65 deletions
|
|
@ -303,8 +303,10 @@ position_xdg_toplevel_view(struct view *view)
|
|||
view->x = center_x - xdg_surface->current.geometry.width / 2;
|
||||
view->y = center_y - xdg_surface->current.geometry.height / 2;
|
||||
}
|
||||
view->x += view->ssd.margin.left;
|
||||
view->y += view->ssd.margin.top;
|
||||
|
||||
struct border margin = ssd_get_margin(view->ssd);
|
||||
view->x += margin.left;
|
||||
view->y += margin.top;
|
||||
}
|
||||
|
||||
static const char *
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue