<div dir="ltr">Got it, thanks Jonas!</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 9, 2016 at 8:56 PM, Jonas Ã…dahl <span dir="ltr"><<a href="mailto:jadahl@gmail.com" target="_blank">jadahl@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 Wed, Nov 09, 2016 at 03:21:30PM -0800, Dima Ryazanov wrote:<br>
> Hi,<br>
><br>
> I'd like to take a shot at implementing window menus (from xdg-shell) in<br>
> Weston - but I don't have a good understanding of how the compositor,<br>
> shell, etc. interact, so wanted to ask about it first.<br>
><br>
> Looks like the entry point for it would be the "show_window_menu" member of<br>
> "shell_desktop_api" in desktop-shell/shell.c. Now, this may be a stupid<br>
> question, but should the menu be implemented in the compositor or in the<br>
> shell client?<br>
<br>
</span>The drawing should be done by the shell client. In the reference shell<br>
implementation in weston, the compositor never does any drawing (well,<br>
except for Xwayland window frame I suppose), and that should continue to<br>
be the case.<br>
<span class=""><br>
><br>
> I feel like it's the compositor's job, but I can't find any examples of<br>
> drawing things or handling input in the compositor itself. If I do it in<br>
> the desktop shell, then I could use the existing popup menu code in<br>
> clients/window.c - but would have to add a bunch of requests to the desktop<br>
> shell protocol just to display the menu and handle the menu items. What's<br>
> the correct approach?<br>
<br>
</span>Yes, add new requests/events to the weston desktop shell protocol.<br>
It's a private protocol so there is no need to care about any backward<br>
compatibility.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
Jonas<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
><br>
> Thanks!<br>
<br>
> ______________________________<wbr>_________________<br>
> wayland-devel mailing list<br>
> <a href="mailto:wayland-devel@lists.freedesktop.org">wayland-devel@lists.<wbr>freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/wayland-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/wayland-devel</a><br>
<br>
</div></div></blockquote></div><br></div>