mirror of
https://github.com/labwc/labwc.git
synced 2025-11-03 09:01:51 -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
|
|
@ -41,7 +41,7 @@ resistance_move_apply(struct view *view, double *x, double *y)
|
|||
struct wlr_box tgeom = {.x = *x, .y = *y, .width = view->w,
|
||||
.height = view->h};
|
||||
struct output *output;
|
||||
struct border border = view->ssd.margin;
|
||||
struct border border = ssd_get_margin(view->ssd);
|
||||
struct edges view_edges; /* The edges of the current view */
|
||||
struct edges target_edges; /* The desired edges */
|
||||
struct edges other_edges; /* The edges of the monitor/other view */
|
||||
|
|
@ -112,7 +112,7 @@ resistance_resize_apply(struct view *view, struct wlr_box *new_view_geo)
|
|||
.height = view->h};
|
||||
struct wlr_box tgeom = {.x = new_view_geo->x, .y = new_view_geo->y,
|
||||
.width = new_view_geo->width, .height = new_view_geo->height};
|
||||
struct border border = view->ssd.margin;
|
||||
struct border border = ssd_get_margin(view->ssd);
|
||||
struct edges view_edges; /* The edges of the current view */
|
||||
struct edges target_edges; /* The desired edges */
|
||||
struct edges other_edges; /* The edges of the monitor/other view */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue