From 2dda972561456cb26a8723e4cf07195ff0b12b23 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Fri, 15 Aug 2008 01:11:39 +0200 Subject: [PATCH] textbox: overwrite extents to 0 on nil Signed-off-by: Julien Danjou --- widgets/textbox.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/widgets/textbox.c b/widgets/textbox.c index ca71f5db5..c81c8b5f3 100644 --- a/widgets/textbox.c +++ b/widgets/textbox.c @@ -157,6 +157,8 @@ luaA_textbox_newindex(lua_State *L, awesome_token_t token) d->extents = draw_text_extents(globalconf.connection, globalconf.default_screen, globalconf.font, d->text, d->len, &d->pdata).width; } + else + d->extents = 0; } break; case A_TK_WIDTH: