[Xcb] [PATCH] xfixes: Update to version 5

Daniel Martin consume.noise at gmail.com
Sun Feb 17 07:02:43 PST 2013


On Thu, Feb 14, 2013 at 04:45:39PM -0800, Bart Massey wrote:
> On Tue, Feb 5, 2013 at 4:30 PM, Neil Roberts <neil at linux.intel.com> wrote:
> > Thanks for the feedback. Here is a second attempt with the enum as
> > suggested.
> >
> > In the spec the name of the enum is BarrierDirections and it has
> > values like ‘BarrierPositiveX’. This would end up with painfully long
> > names like this:
> >
> > XCB_XFIXES_BARRIER_DIRECTION_MASK_BARRIER_POSITIVE_X
> >
> > Therefore I went with the same name that you suggested, i.e.
> > ‘DirectionMask’ with values like ‘PositiveX’.
> >
> > Regards,
> > - Neil
> >
> > -- >8 --
> >
> > This adds the two new functions in XFixes version 5 for handling
> > pointer barriers.
> >
> > Signed-off-by: Neil Roberts <neil at linux.intel.com>
> > ---
> >  src/xfixes.xml | 30 +++++++++++++++++++++++++++++-
> >  1 file changed, 29 insertions(+), 1 deletion(-)
> >
> > diff --git a/src/xfixes.xml b/src/xfixes.xml
> > index 9bbeaab..014a37c 100644
> > --- a/src/xfixes.xml
> > +++ b/src/xfixes.xml
> > @@ -26,7 +26,7 @@ authorization from the authors.
> >  -->
> >  <!-- This file describes version 4 of XFixes. -->
> >  <xcb header="xfixes" extension-xname="XFIXES" extension-name="XFixes"
> > -    major-version="4" minor-version="0">
> > +    major-version="5" minor-version="0">
> >    <import>xproto</import>
> >    <import>render</import>
> >    <import>shape</import>
> > @@ -331,4 +331,32 @@ authorization from the authors.
> >    <request name="ShowCursor" opcode="30">
> >      <field type="WINDOW" name="window" />
> >    </request>
> > +
> > +  <!-- Version 5 -->
> > +
> > +  <xidtype name="BARRIER" />
> > +
> > +  <enum name="DirectionMask">
> > +    <item name="PositiveX"><bit>0</bit></item>
> > +    <item name="PositiveY"><bit>1</bit></item>
> > +    <item name="NegativeX"><bit>2</bit></item>
> > +    <item name="NegativeY"><bit>3</bit></item>
> > +  </enum>
> > +
> > +  <request name="CreatePointerBarrier" opcode="31">
> > +    <field type="BARRIER" name="barrier" />
> > +    <field type="DRAWABLE" name="drawable" />
> > +    <field type="CARD16" name="x1" />
> > +    <field type="CARD16" name="y1" />
> > +    <field type="CARD16" name="x2" />
> > +    <field type="CARD16" name="y2" />
> > +    <field type="CARD32" name="directions" mask="DirectionMask" />
> > +    <pad bytes="2" />
> > +    <field type="CARD16" name="num_devices" />
> > +    <list type="CARD16" name="devices"><fieldref>num_devices</fieldref></list>
> > +  </request>
> > +
> > +  <request name="DeletePointerBarrier" opcode="32">
> > +    <field type="BARRIER" name="barrier" />
> > +  </request>
> >  </xcb>
> > --
> > 1.7.11.3.g3c3efa5

> I would love to have the names in XCB match the names in the
> spec--this was a design goal of XCB. Those are painful looking names,
> however. I wonder if there's some compromise? --Bart

The enum could've been called 'BarrierDirections' as in the spec. But,
removing the 'Barrier' prefix from the item names is imho a good
decision.

As this commit hasn't landed in a release yet, we could change the enum
name. Would you be fine with that compromise?


More information about the Xcb mailing list