[PATCH 1/2 weston] toytoolkit: Correct improper usage of opaque for button widgets.

Scott Moreau oreaus at gmail.com
Mon Aug 6 23:32:22 PDT 2012


---
 clients/window.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/clients/window.c b/clients/window.c
index d0b7a7d..30a6167 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -1259,7 +1259,7 @@ frame_resize_handler(struct widget *widget,
 		opaque_margin = t->margin + t->frame_radius;
 
 		wl_list_for_each(button, &frame->buttons_list, link)
-			button->widget->opaque = 0;
+			button->widget->opaque = 1;
 	} else {
 		decoration_width = 0;
 		decoration_height = 0;
@@ -1271,7 +1271,7 @@ frame_resize_handler(struct widget *widget,
 		opaque_margin = 0;
 
 		wl_list_for_each(button, &frame->buttons_list, link)
-			button->widget->opaque = 1;
+			button->widget->opaque = 0;
 	}
 
 	widget_set_allocation(child, allocation.x, allocation.y,
@@ -1416,7 +1416,7 @@ frame_button_redraw_handler(struct widget *widget, void *data)
 		return;
 	if (!height)
 		return;
-	if (widget->opaque)
+	if (!widget->opaque)
 		return;
 
 	cr = cairo_create(window->cairo_surface);
-- 
1.7.11.2



More information about the wayland-devel mailing list