<div dir="ltr">Hi Adam,<br><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 23, 2018 at 6:41 PM, Adam Jackson <span dir="ltr"><<a href="mailto:ajax@nwnk.net" target="_blank">ajax@nwnk.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-"><br>
</span>Map / draw / unmap without hitting BlockHandler? I think<br>
xwl_unrealize_window() might be broken for that case:<br>
<br>
    /* ... */<br>
    wl_surface_destroy(xwl_window-<wbr>>surface);<br>
    if (RegionNotEmpty(DamageRegion(<wbr>xwl_window->damage)))<br>
        xorg_list_del(&xwl_window-><wbr>link_damage);<br>
    DamageUnregister(xwl_window-><wbr>damage);<br>
    DamageDestroy(xwl_window-><wbr>damage);<br>
    /* ... */<br>
<br>
If (for whatever reason) the damage region wasn't empty, we'd never<br></blockquote><div><br></div><div>You mean “was empty” here, right, or do I misunderstand?</div><div><br></div><div>(we unlink if RegionNotEmpty() so we don't unlink if the region is empty)<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
unlink this window from the dirty list. Should probably just unlink it<br>
unconditionally. If this is indeed what's happening, then the window<br>
being updated in xwl_window_post_damage() would have ->mapped = 0, and<br>
would be not the root window itself.<br></blockquote><div><br></div><div>So basically, just remove the  “if (RegionNotEmpty(DamageRegion(<wbr>xwl_window->damage)))” would suffice?</div><div><br></div><div>Cheers,</div><div>Olivier<br></div></div></div></div></div>