mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
ssd: Add missing state updates
- Update `ssd.state` in `ssd_create()` to avoid doing unnecessary work in the next call to `ssd_update_geometry()` - Reset `ssd.margin` in `ssd_destroy()` to avoid accidentally using stale values
This commit is contained in:
parent
cb16da5a78
commit
d6aea3e58f
1 changed files with 6 additions and 0 deletions
|
|
@ -153,6 +153,11 @@ ssd_create(struct view *view, bool active)
|
|||
ssd_titlebar_create(view);
|
||||
view->ssd.margin = ssd_thickness(view);
|
||||
ssd_set_active(view, active);
|
||||
|
||||
view->ssd.state.width = view->w;
|
||||
view->ssd.state.height = view->h;
|
||||
view->ssd.state.x = view->x;
|
||||
view->ssd.state.y = view->y;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -202,6 +207,7 @@ ssd_destroy(struct view *view)
|
|||
ssd_extents_destroy(view);
|
||||
wlr_scene_node_destroy(&view->ssd.tree->node);
|
||||
view->ssd.tree = NULL;
|
||||
view->ssd.margin = (struct border){ 0 };
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue