<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On 2 September 2014 11:27, Pier Luigi Fiorini <span dir="ltr"><<a href="mailto:pierluigi.fiorini@gmail.com" target="_blank">pierluigi.fiorini@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">2014-09-02 11:11 GMT+02:00 Marek Chalupa <<a href="mailto:mchqwerty@gmail.com">mchqwerty@gmail.com</a>>:<br>
<br>
[cut]<br>
<div class=""><br>
>  desktop-shell/shell.c | 33 +++++++++++++++++++++++++++++++++<br>
>  1 file changed, 33 insertions(+)<br>
><br>
> diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c<br>
> index 9c0e721..cc7fb4a 100644<br>
> --- a/desktop-shell/shell.c<br>
> +++ b/desktop-shell/shell.c<br>
> @@ -3584,6 +3584,32 @@ xdg_surface_unset_maximized(struct wl_client *client,<br>
>         send_configure_for_surface(shsurf);<br>
>  }<br>
><br>
> +static struct weston_output *<br>
> +get_focused_output(struct weston_compositor *compositor)<br>
> +{<br>
> +       struct weston_seat *seat;<br>
> +       struct weston_output *output = NULL;<br>
> +<br>
> +       wl_list_for_each(seat, &compositor->seat_list, link) {<br>
> +               /* Priority has touch focus, then pointer and<br>
> +                * then keyboard focus. We should probably have<br>
> +                * three for loops and check frist for touch,<br>
> +                * then for pointer, etc. but unless somebody has some<br>
> +                * objections, I think this is sufficient. */<br>
> +               if (seat->touch && seat->touch->focus)<br>
> +                       output = seat->pointer->focus->output;<br>
<br>
</div>This should probably be seat->touch->focus->output<br></blockquote><div><br></div><div>Of course, thanks.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class=""><br>
> +               else if (seat->pointer && seat->pointer->focus)<br>
> +                       output = seat->pointer->focus->output;<br>
> +               else if (seat->keyboard && seat->keyboard->focus)<br>
> +                       output = seat->keyboard->focus->output;<br>
> +<br>
> +               if (output)<br>
> +                       break;<br>
> +       }<br>
> +<br>
> +       return output;<br>
> +}<br>
> +<br>
<br>
</div>[cut]<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Out of the box experience<br>
<a href="http://www.maui-project.org/" target="_blank">http://www.maui-project.org/</a><br>
</font></span></blockquote></div><br></div><div class="gmail_extra">Thanks,<br></div><div class="gmail_extra">Marek<br></div></div>