mirror of
https://github.com/labwc/labwc.git
synced 2025-11-12 13:30:11 -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
|
|
@ -37,7 +37,7 @@ lab_wlr_output_layout_layout_coords(struct wlr_output_layout *layout,
|
|||
void
|
||||
ssd_extents_create(struct ssd *ssd)
|
||||
{
|
||||
struct view *view = wl_container_of(ssd, view, ssd);
|
||||
struct view *view = ssd->view;
|
||||
struct theme *theme = view->server->theme;
|
||||
struct wl_list *part_list = &ssd->extents.parts;
|
||||
int extended_area = EXTENDED_AREA;
|
||||
|
|
@ -98,7 +98,7 @@ ssd_extents_create(struct ssd *ssd)
|
|||
void
|
||||
ssd_extents_update(struct ssd *ssd)
|
||||
{
|
||||
struct view *view = wl_container_of(ssd, view, ssd);
|
||||
struct view *view = ssd->view;
|
||||
if (view->maximized || view->fullscreen) {
|
||||
wlr_scene_node_set_enabled(&ssd->extents.tree->node, false);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue