mirror of
https://github.com/labwc/labwc.git
synced 2025-11-03 09:01:51 -05:00
Chase wlroots: wlr_scene_surface
To update the wlroots subproject use meson subprojects update wlroots
This commit is contained in:
parent
3699a2a7f6
commit
163179dda1
9 changed files with 39 additions and 22 deletions
|
|
@ -9,3 +9,19 @@ lab_wlr_scene_get_rect(struct wlr_scene_node *node)
|
|||
assert(node->type == WLR_SCENE_NODE_RECT);
|
||||
return (struct wlr_scene_rect *)node;
|
||||
}
|
||||
|
||||
struct wlr_surface *
|
||||
lab_wlr_surface_from_node(struct wlr_scene_node *node)
|
||||
{
|
||||
struct wlr_scene_buffer *buffer;
|
||||
struct wlr_scene_surface *scene_surface;
|
||||
|
||||
if (node && node->type == WLR_SCENE_NODE_BUFFER) {
|
||||
buffer = wlr_scene_buffer_from_node(node);
|
||||
scene_surface = wlr_scene_surface_from_buffer(buffer);
|
||||
if (scene_surface) {
|
||||
return scene_surface->surface;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue