mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-24 06:59:45 -05:00
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.
This commit is contained in:
parent
c41bd320be
commit
86e9309808
2 changed files with 15 additions and 0 deletions
|
|
@ -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
|
||||
};
|
||||
|
||||
|
|
@ -68,6 +69,11 @@ struct wlr_scene_surface {
|
|||
* Immediately destroy the scene-graph node.
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue