window: simplify a bit widget_set_size and widget_set_allocation
Signed-off-by: Tiago Vignatti <vignatti@freedesktop.org>
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
diff --git a/clients/window.c b/clients/window.c
index 5264d87..ae5a791 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -1076,8 +1076,6 @@
void
widget_set_size(struct widget *widget, int32_t width, int32_t height)
{
- struct window *window = widget->window;
-
widget->allocation.width = width;
widget->allocation.height = height;
}
@@ -1088,8 +1086,7 @@
{
widget->allocation.x = x;
widget->allocation.y = y;
- widget->allocation.width = width;
- widget->allocation.height = height;
+ widget_set_size(widget, width, height);
}
void *