What exactly does this fix? Your commit message doesn't make it that
obvious.
Weston commit 010f98b0 added the opaque field to struct widget to "track
and report [...] opaque regions", i.e., the region of a surface whose
alpha channel is 1. It seems to me the frame button code is abusing this
field to hide the buttons in fullscreen mode. IMO, either way you define
a visibility value based on the opacity value results in improper usage.
Cheers,
Ander
On 08/07/2012 09:32 AM, Scott Moreau wrote:
---
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);
_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel