<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 19, 2015 at 11:35 PM, Pekka Paalanen <span dir="ltr"><<a href="mailto:ppaalanen@gmail.com" target="_blank">ppaalanen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tue, 19 May 2015 16:41:19 -0700<br>
Bryce Harrington <<a href="mailto:bryce@osg.samsung.com">bryce@osg.samsung.com</a>> wrote:<br>
<br>
> On Mon, May 18, 2015 at 11:14:16PM -0700, Dima Ryazanov wrote:<br>
> > When a compositor window is closed, remove the output instead of just exiting.<br>
> ><br>
> > (The "if (!input->output)" checks are kind of ugly - but I couldn't find<br>
> > a better way to handle the output going away.)<br>
> ><br>
> > Signed-off-by: Dima Ryazanov <<a href="mailto:dima@gmail.com">dima@gmail.com</a>><br>
> Reviewed-by: Bryce Harrington <<a href="mailto:bryce@osg.samsung.com">bryce@osg.samsung.com</a>><br>
<br>
</span>Acked-by: Pekka Paalanen <<a href="mailto:pekka.paalanen@collabora.co.uk">pekka.paalanen@collabora.co.uk</a>><br>
<br>
If someone tests this patch (maybe Bryce already did?) that it doesn't<br>
cause any harm wrt. closing compositor windows in single and multi<br>
window cases, then I think this is suitable to go in before RC2. After<br>
RC2 not so much.<br>
<span class=""><br>
> > @@ -1384,8 +1393,15 @@ input_handle_button(void *data, struct wl_pointer *pointer,<br>
> >                     return;<br>
> >             }<br>
> ><br>
> > -           if (frame_status(input->output->frame) & FRAME_STATUS_CLOSE)<br>
> > -                   wl_display_terminate(input->compositor->base.wl_display);<br>
> > +           if (frame_status(input->output->frame) & FRAME_STATUS_CLOSE) {<br>
> > +                   wayland_output_destroy(&input->output->base);<br>
> > +                   input->output = input->keyboard_focus = NULL;<br>
<br>
</span>Please don't do multi-assignments like this, it's too easy to miss one<br>
of them when reading. Also setting output to keyboard_focus is strange<br>
to begin with, which is how I'd carelessly read this and go wtf.<br></blockquote><div><br></div><div>Haha ok, I'll send out a fix.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks,<br>
pq<br>
</blockquote></div><br></div></div>