From 131f31c561d23e60892354e963d078a641f8d175 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 4 Jun 2008 13:27:13 +0200 Subject: [PATCH] [titlebar] Redraw on widget_add Signed-off-by: Julien Danjou --- titlebar.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/titlebar.c b/titlebar.c index 4cd0ddc30..d9ecf6458 100644 --- a/titlebar.c +++ b/titlebar.c @@ -439,13 +439,18 @@ luaA_titlebar_widget_add(lua_State *L) titlebar_t **tb = luaL_checkudata(L, 1, "titlebar"); widget_t **widget = luaL_checkudata(L, 2, "widget"); widget_node_t *w = p_new(widget_node_t, 1); + client_t *c; w->widget = *widget; widget_node_list_append(&(*tb)->widgets, w); widget_ref(widget); - /* XXX */ -// titlebar_draw(*tb); + for(c = globalconf.clients; c; c = c->next) + if(c->titlebar == *tb) + { + titlebar_draw(c); + break; + } return 0; }