mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
titlebar: use client_getbytitlebar() to get client
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
694f97e4d7
commit
2a027ef2a9
1 changed files with 1 additions and 7 deletions
|
@ -344,7 +344,6 @@ luaA_titlebar_widget_add(lua_State *L)
|
|||
titlebar_t **tb = luaA_checkudata(L, 1, "titlebar");
|
||||
widget_t **widget = luaA_checkudata(L, 2, "widget");
|
||||
widget_node_t *witer, *w = p_new(widget_node_t, 1);
|
||||
client_t *c;
|
||||
|
||||
if((*widget)->type == systray_new)
|
||||
luaL_error(L, "cannot add systray widget to titlebar");
|
||||
|
@ -360,12 +359,7 @@ luaA_titlebar_widget_add(lua_State *L)
|
|||
widget_node_list_append(&(*tb)->widgets, w);
|
||||
widget_ref(widget);
|
||||
|
||||
for(c = globalconf.clients; c; c = c->next)
|
||||
if(c->titlebar == *tb)
|
||||
{
|
||||
titlebar_draw(c);
|
||||
break;
|
||||
}
|
||||
titlebar_draw(client_getbytitlebar(*tb));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue