From 3fbfd0658a04e34a1d8eff517bd03dd3634e7a71 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 21 Aug 2008 15:08:56 +0200 Subject: [PATCH] widget: invalidate on visible change Signed-off-by: Julien Danjou --- widget.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/widget.c b/widget.c index cb4ea470..29f708f9 100644 --- a/widget.c +++ b/widget.c @@ -70,7 +70,7 @@ widget_common_button_press(widget_node_t *w, awesome_type_t type) { button_t *b; - + for(b = w->widget->buttons; b; b = b->next) if(ev->detail == b->button && XUTIL_MASK_CLEAN(ev->state) == b->mod && b->fct) { @@ -143,7 +143,7 @@ widget_render(widget_node_t *wnode, draw_context_t *ctx, xcb_gcontext_t gc, xcb_ xcb_copy_area(globalconf.connection, rootpix, rotate_px, gc, x, y, - 0, 0, + 0, 0, ctx->width, ctx->height); break; } @@ -395,10 +395,12 @@ luaA_widget_newindex(lua_State *L) (*widget)->isvisible = luaA_checkboolean(L, 3); return 0; default: - break; + return (*widget)->newindex ? (*widget)->newindex(L, token) : 0; } - return (*widget)->newindex ? (*widget)->newindex(L, token) : 0; + widget_invalidate_bywidget(*widget); + + return 0; } /** Generic widget set.