mirror of
https://github.com/swaywm/sway.git
synced 2026-04-20 06:47:03 -04:00
chore: handle memory leaking
This commit is contained in:
parent
5725d3a170
commit
77343fde2b
1 changed files with 6 additions and 6 deletions
|
|
@ -312,15 +312,15 @@ static void input_popup_update(struct sway_input_popup *popup) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!popup->popup_surface->surface->mapped) {
|
if (!popup->popup_surface->surface->mapped) {
|
||||||
|
popup->scene_tree = NULL;
|
||||||
|
popup->desc.view = NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (popup->scene_tree != NULL) {
|
wlr_scene_node_destroy(&popup->scene_tree->node);
|
||||||
wlr_scene_node_destroy(&popup->scene_tree->node);
|
wlr_scene_node_destroy(popup->desc.relative);
|
||||||
if (popup->desc.relative != NULL) {
|
popup->scene_tree = NULL;
|
||||||
wlr_scene_node_destroy(popup->desc.relative);
|
popup->desc.view = NULL;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool cursor_rect = text_input->input->current.features
|
bool cursor_rect = text_input->input->current.features
|
||||||
& WLR_TEXT_INPUT_V3_FEATURE_CURSOR_RECTANGLE;
|
& WLR_TEXT_INPUT_V3_FEATURE_CURSOR_RECTANGLE;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue