alt-tab preview: restore functionality after move to scene-graph

This commit is contained in:
Consolatis 2022-04-26 23:56:27 +02:00
parent 296e58079f
commit 15a5b710db
7 changed files with 98 additions and 4 deletions

View file

@ -32,3 +32,15 @@ lab_wlr_surface_from_node(struct wlr_scene_node *node)
}
return NULL;
}
struct wlr_scene_node *
lab_wlr_scene_get_prev_node(struct wlr_scene_node *node)
{
assert(node);
struct wlr_scene_node *prev;
prev = wl_container_of(node->link.prev, node, link);
if (&prev->link == &node->parent->children) {
return NULL;
}
return prev;
}