mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-25 14:15:58 +01:00
wlr_scene: Damage scene on node destroy by disabling node
This removes one trivial call of scene_node_damage_whole. It's easier to disable the node later than it is to do the damage dance later.
This commit is contained in:
parent
7f17774d18
commit
f411ca040e
1 changed files with 2 additions and 2 deletions
|
@ -79,13 +79,13 @@ void wlr_scene_node_destroy(struct wlr_scene_node *node) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
scene_node_damage_whole(node);
|
|
||||||
|
|
||||||
// We want to call the destroy listeners before we do anything else
|
// We want to call the destroy listeners before we do anything else
|
||||||
// in case the destroy signal would like to remove children before they
|
// in case the destroy signal would like to remove children before they
|
||||||
// are recursively destroyed.
|
// are recursively destroyed.
|
||||||
wlr_signal_emit_safe(&node->events.destroy, NULL);
|
wlr_signal_emit_safe(&node->events.destroy, NULL);
|
||||||
|
|
||||||
|
wlr_scene_node_set_enabled(node, false);
|
||||||
|
|
||||||
struct wlr_scene *scene = scene_node_get_root(node);
|
struct wlr_scene *scene = scene_node_get_root(node);
|
||||||
if (node->type == WLR_SCENE_NODE_BUFFER) {
|
if (node->type == WLR_SCENE_NODE_BUFFER) {
|
||||||
struct wlr_scene_buffer *scene_buffer = wlr_scene_buffer_from_node(node);
|
struct wlr_scene_buffer *scene_buffer = wlr_scene_buffer_from_node(node);
|
||||||
|
|
Loading…
Reference in a new issue