From 2a027ef2a9488fb29d3938ec6ef1e26c1387c8c9 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 18 Jun 2008 17:15:03 +0200 Subject: [PATCH] titlebar: use client_getbytitlebar() to get client Signed-off-by: Julien Danjou --- titlebar.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/titlebar.c b/titlebar.c index fba65666..f8c2f10a 100644 --- a/titlebar.c +++ b/titlebar.c @@ -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; }