[PATCH] wayland: add a release request on wl_seat

Bryce Harrington bryce at osg.samsung.com
Wed Oct 7 17:44:05 PDT 2015


On Mon, Oct 05, 2015 at 12:24:19PM -0500, Derek Foreman wrote:
> On 02/10/15 07:20 AM, David FORT wrote:
> > This is required if we want to correctly remove a wl_seat compositor-side. A
> > wl_seat is announced as a global object, then it is bound by the client. When
> > the compositor wants to remove the seat, it shall announce the global removal of
> > the object. The client can then call the release request on the wl_seat (which
> > means I won't use that object anymore).
> 
> Acked-by: Derek Foreman <derekf at osg.samsung.com>
> 
> Looks good to me, though you appear to have used a tab to indent one
> line and spaces on the line just after?
> 
> This actually seems to fit with the current state of that file - does
> anyone know what the intended formatting paradigm is here? :)

Last time I studied it, it appeared the .xml files use 4-space
indentations, substituted with tab characters to fill to column 8.

I'm not sure we're really all that strict on the indentation for the
.xml files like we are with the .c files, and there's likely a fair bit
of inconsistency in the existing files.  But I try to clean up
formatting when my editor flags it.  This is what I use in my
.dir-locals.el for editing wayland files:

;; The 'nil' configuration applies to all modes.
((nil . 
        ;; Globally
        ((indent-tabs-mode . t)
         (c-basic-offset . 4)
         (tab-width . 4)
         ))

 ;; Mode overrides
 (c-mode . (
         ;; Highlight leading space characters
         (eval . (highlight-regexp "^ +[^*]"))
                 (c-basic-offset . 8)
                 (tab-width . 8)
                )
))

Honestly I don't know why we have one indent rule for .c files and
apparently something different for .xml, but there you go and spare
me the emacs snark, I can tell what you're thinking right now.

Bryce

> > ---
> >  protocol/wayland.xml | 11 ++++++++++-
> >  1 file changed, 10 insertions(+), 1 deletion(-)
> > 
> > diff --git a/protocol/wayland.xml b/protocol/wayland.xml
> > index 42c9309..59819e9 100644
> > --- a/protocol/wayland.xml
> > +++ b/protocol/wayland.xml
> > @@ -1329,7 +1329,7 @@
> >      </request>
> >     </interface>
> >  
> > -  <interface name="wl_seat" version="4">
> > +  <interface name="wl_seat" version="5">
> >      <description summary="group of input devices">
> >        A seat is a group of keyboards, pointer and touch devices. This
> >        object is published as a global during start up, or when such a
> > @@ -1400,6 +1400,15 @@
> >        <arg name="name" type="string"/>
> >      </event>
> >  
> > +    <!-- Version 5 additions -->
> > +
> > +    <request name="release" type="destructor" since="5">
> > +      <description summary="release the seat object">
> > +      Using this request client can tell the server that it is not going to
> > +	use the seat object anymore.
> > +      </description>
> > +    </request>
> > +
> >    </interface>
> >  
> >    <interface name="wl_pointer" version="3">
> > 
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list