diff options
author | Simon Ser <contact@emersion.fr> | 2020-05-06 16:16:45 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-08-26 21:12:28 +0200 |
commit | 86e9309808ae147dff0ac3884148d53b2c3edf2b (patch) | |
tree | 3da92be39e007648b2aca38a4d9cb8dee09c2a50 /include | |
parent | c41bd320be0862648188bf4cb3700203c41fb70b (diff) |
scene: add wlr_scene_node_toggle
This allows compositors to easily enable or disable a scene-graph node.
This can be used to show/hide a surface when the xdg_surface is
mapped/unmapped.
Diffstat (limited to 'include')
-rw-r--r-- | include/wlr/types/wlr_scene.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_scene.h b/include/wlr/types/wlr_scene.h index 953b1b87..b5690575 100644 --- a/include/wlr/types/wlr_scene.h +++ b/include/wlr/types/wlr_scene.h @@ -35,6 +35,7 @@ struct wlr_scene_node_state { struct wl_list children; // wlr_scene_node_state.link + bool enabled; int x, y; // relative to parent }; @@ -69,6 +70,11 @@ struct wlr_scene_surface { */ void wlr_scene_node_destroy(struct wlr_scene_node *node); /** + * Enable or disable this node. If a node is disabled, all of its children are + * implicitly disabled as well. + */ +void wlr_scene_node_set_enabled(struct wlr_scene_node *node, bool enabled); +/** * Set the position of the node relative to its parent. */ void wlr_scene_node_set_position(struct wlr_scene_node *node, int x, int y); |