From 59a0f7e34b70e5a9bb88e46795abdf2f256b6aac Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Tue, 25 Aug 2009 18:26:58 +0200 Subject: [PATCH] imagebox: merge geometry and extents Signed-off-by: Julien Danjou --- widgets/imagebox.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/widgets/imagebox.c b/widgets/imagebox.c index 24d92c5a..b9132823 100644 --- a/widgets/imagebox.c +++ b/widgets/imagebox.c @@ -33,9 +33,9 @@ typedef struct } imagebox_data_t; static area_t -imagebox_geometry(widget_t *widget, int screen) +imagebox_extents(lua_State *L, widget_t *widget) { - area_t geometry; + area_t geometry = { .x = 0, .y = 0 }; imagebox_data_t *d = widget->data; if(d->image) @@ -49,17 +49,9 @@ imagebox_geometry(widget_t *widget, int screen) geometry.height = 0; } - geometry.x = geometry.y = 0; - return geometry; } -static area_t -imagebox_extents(lua_State *L, widget_t *widget) -{ - return imagebox_geometry(widget, 0); -} - /** Draw an image. * \param widget The widget. * \param ctx The draw context. -- 2.11.4.GIT