[PATCH 4/5] window: simplify a bit widget_set_size and widget_set_allocation

Tiago Vignatti tiago.vignatti at intel.com
Thu Feb 9 09:06:55 PST 2012


From: Tiago Vignatti <vignatti at freedesktop.org>

Signed-off-by: Tiago Vignatti <vignatti at freedesktop.org>
---
 clients/window.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

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 @@ widget_get_allocation(struct widget *widget, struct rectangle *allocation)
 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_set_allocation(struct widget *widget,
 {
 	widget->allocation.x = x;
 	widget->allocation.y = y;
-	widget->allocation.width = width;
-	widget->allocation.height = height;
+	widget_set_size(widget, width, height);
 }
 
 void *
-- 
1.7.5.4



More information about the wayland-devel mailing list