mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
titlebar: set to NULL after unref()
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
a56997aefb
commit
c5dfc8a40a
2 changed files with 4 additions and 0 deletions
2
client.c
2
client.c
|
@ -708,6 +708,7 @@ client_unmanage(client_t *c)
|
|||
{
|
||||
simplewindow_delete(&c->titlebar->sw);
|
||||
titlebar_unref(&c->titlebar);
|
||||
c->titlebar = NULL;
|
||||
}
|
||||
|
||||
ewmh_update_net_client_list(c->phys_screen);
|
||||
|
@ -1209,6 +1210,7 @@ luaA_client_newindex(lua_State *L)
|
|||
{
|
||||
simplewindow_delete(&(*c)->titlebar->sw);
|
||||
titlebar_unref(&(*c)->titlebar);
|
||||
(*c)->titlebar = NULL;
|
||||
globalconf.screens[(*c)->screen].need_arrange = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -389,6 +389,7 @@ luaA_titlebar_newindex(lua_State *L)
|
|||
{
|
||||
simplewindow_delete(&(*newc)->titlebar->sw);
|
||||
titlebar_unref(&(*newc)->titlebar);
|
||||
(*newc)->titlebar = NULL;
|
||||
globalconf.screens[(*newc)->screen].need_arrange = true;
|
||||
}
|
||||
/* Attach titlebar to client */
|
||||
|
@ -404,6 +405,7 @@ luaA_titlebar_newindex(lua_State *L)
|
|||
simplewindow_delete(&(*titlebar)->sw);
|
||||
/* unref and NULL the ref */
|
||||
titlebar_unref(&c->titlebar);
|
||||
c->titlebar = NULL;
|
||||
globalconf.screens[c->screen].need_arrange = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue