mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-06-19 14:33:16 -04:00
opt: make sure the node init to null
This commit is contained in:
parent
a5d44d7347
commit
fbd0863b61
6 changed files with 78 additions and 56 deletions
16
src/mango.c
16
src/mango.c
|
|
@ -1275,8 +1275,7 @@ void swallow(Client *c, Client *w) {
|
|||
}
|
||||
|
||||
if (w->tab_bar_node) {
|
||||
wlr_scene_node_set_enabled(&w->tab_bar_node->scene_buffer->node,
|
||||
false);
|
||||
wlr_scene_node_set_enabled(&w->tab_bar_node->scene_buffer->node, false);
|
||||
}
|
||||
|
||||
/* 全局链表替换 */
|
||||
|
|
@ -4423,6 +4422,8 @@ void init_client_properties(Client *c) {
|
|||
c->grid_col_per = 1.0f;
|
||||
c->grid_row_per = 1.0f;
|
||||
c->is_monocle_hide = false;
|
||||
c->jump_label_node = NULL;
|
||||
c->tab_bar_node = NULL;
|
||||
c->overview_scene_surface = NULL;
|
||||
c->drop_direction = UNDIR;
|
||||
c->enable_drop_area_draw = false;
|
||||
|
|
@ -6570,8 +6571,15 @@ void unmapnotify(struct wl_listener *listener, void *data) {
|
|||
|
||||
c->stack_proportion = 0.0f;
|
||||
|
||||
mango_jump_label_node_destroy(c->jump_label_node);
|
||||
mango_tab_bar_node_destroy(c->tab_bar_node);
|
||||
if (c->jump_label_node) {
|
||||
mango_jump_label_node_destroy(c->jump_label_node);
|
||||
c->jump_label_node = NULL;
|
||||
}
|
||||
if (c->tab_bar_node) {
|
||||
mango_tab_bar_node_destroy(c->tab_bar_node);
|
||||
c->tab_bar_node = NULL;
|
||||
}
|
||||
|
||||
wlr_scene_node_destroy(&c->scene->node);
|
||||
printstatus(IPC_WATCH_ARRANGGE);
|
||||
motionnotify(0, NULL, 0, 0, 0, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue