Hi Ander,<br><br><div class="gmail_quote">On Tue, Aug 7, 2012 at 2:57 AM, Ander Conselvan de Oliveira <span dir="ltr"><<a href="mailto:conselvan2@gmail.com" target="_blank">conselvan2@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What exactly does this fix? Your commit message doesn't make it that obvious.<br></blockquote><div><br>I assumed the problem was obvious. The definition of the word opaque makes it clear. In frame_button_redraw_handler() the code returns (i.e. does not draw the buttons) if widget->opaque is set. It should be the other way around.<br>
<div id=":w"></div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
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.</blockquote><div><br>I don't think this commit is relevant here. What is relevant is the meaning of opaque. (since cgit.fd.o is down at the moment I will post some snippets) For widget_set_transparent() you have<br>
<br>widget_set_transparent(struct widget *widget, int transparent)<br>{<br>    widget->opaque = !transparent;<br>}<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
 It seems to me the frame button code is abusing this field to hide the buttons in fullscreen mode.</blockquote><div><br>This may be the case but see window.c~:1300 frame_resize_handler()<br><br><br>    if (child->opaque) {<br>
        widget->window->opaque_region =<br>            wl_compositor_create_region(display->compositor);<br>        wl_region_add(widget->window->opaque_region,<br>                  opaque_margin, opaque_margin,<br>
                  widget->allocation.width - 2 * opaque_margin,<br>                  widget->allocation.height - 2 * opaque_margin);<br>    }<br><br>it adds the region if opaque is set.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
 IMO, either way you define a visibility value based on the opacity value results in improper usage.<br></blockquote><div><br>I did not write this code, I'm just building on top of it while trying to improve it. If you have a better idea, I would be interested to know what you think.<br>
 <br><br><br>Regards,<br><br>Scott<br></div></div><br>