[RFC wayland-protocols] unstable: add protocol to give focus to a foreign surface

raof at ubuntu.com raof at ubuntu.com
Wed Jul 11 04:23:26 UTC 2018

On 10 July 2018 6:03:26 pm AEST, David Edmundson <david at davidedmundson.co.uk> wrote:
>>Hm. If you wanted to, you could make this explicit by requiring an
>event serial in the export_surface request rather than the wl_surface.
>Certainly an option. Though I'm not sure we have a use case of needing
>to limit a client releasing its focus?

I can't think of one offhand. I just prefer the explicitness of “*this* user action caused us to request focus”.

That's just for delegating focus, though.

As Markus suggested, this *could* be a special case of a more general interface. We had this handle as MirCookie in Mir, and had a bunch of interfaces which requires a cookie. It turned out that a transferable token containing an unforgeable timestamp of a user interaction was a useful primitive.

>>Does this interface need to exist?
>It doesn't /need/ to, but I need to be able to export a handle
>multiple times and it's nice in the client to be able to match up
>requests with the reply.

This is also an advantage of the handle-for-serial style interface - the reply event can contain both the handle and the serial it's for, eliminating this otherwise superfluous interface.

More information about the wayland-devel mailing list