From 1c147a6d7694a98cba148bda3778ca04eea27583 Mon Sep 17 00:00:00 2001 From: Matus Telgarsky Date: Tue, 14 Apr 2009 19:36:37 -0700 Subject: [PATCH] graph: fix for missing allocation resizing graph widgets (by setting the width parameter) was failing to update the caches draw_to and draw_from. I have attached a 2-line patch remedying this. The bug wasn't caught earlier because the default size, 80, is bigger than what people typically use. Signed-off-by: Julien Danjou --- widgets/graph.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/widgets/graph.c b/widgets/graph.c index d8f1fa9f..7d092bca 100644 --- a/widgets/graph.c +++ b/widgets/graph.c @@ -510,6 +510,8 @@ luaA_graph_newindex(lua_State *L, awesome_token_t token) { d->width = width; d->size = d->width - 2; + p_realloc(&d->draw_from, d->size); + p_realloc(&d->draw_to, d->size); for(int i = 0; i < d->plots.len; i++) { plot_t *plot = &d->plots.tab[i];