Commit graph

329 commits

Author SHA1 Message Date
Peter Harris
969583f4dc Present: Remove reference to nonexistent enum
Signed-off-by: Peter Harris <pharris@opentext.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
2013-11-18 18:29:03 +09:00
Ran Benita
7c85d67b1b xkb: Add struct Property as per spec (commented out)
The specification says that Property is a struct of two CountedString16
(name and value). This form can't be handled atm. correctly too. But,
add it as a comment so we've it at hand when we know what to do with it.

All credits go to Ran Benita, as he found this.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
2013-11-14 20:25:39 +09:00
Daniel Martin
e76dc36de8 xkb: Comment out intermixed fixed size fields and lists
c_client.py doesn't handle such intermixed fixed size fields and lists
correctly. Therefor comment them out.

With that change the size of the generated request structure for
ListComponents has 8 Bytes which is the same as xkbListComponentsReq
has and the server checks REQUEST_AT_LEAST_SIZE(xkbListComponentsReq).
The same goes for GetKbdByName, which results in a structure of 12
Bytes.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-By: Ran Benita <ran234@gmail.com>
2013-11-14 20:24:03 +09:00
Daniel Martin
0c408c53ff xkb: Comment out the struct Property and {Get, Set}Geometry
This struct has intermixed fixed size fields and lists, which
c_client.py doesn't handle properly. Therefor comment out the struct and
the fields type-referencing it.

As doodads are commented out already and with Property gone the requests
GetGeomtry and SetGeometry become pretty much useless. Therefor comment
them out completly.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-By: Ran Benita <ran234@gmail.com>
2013-11-14 20:23:50 +09:00
Daniel Martin
7482d02e62 xkb: Comment out Doodads
Doodads are known to be broken (*). Comment them out until they can be
handled properly.

(*) One problem is that TextDoodad and LogoDoodad have variadic lists at
the end. But, they're within a union with other fixed size Doodads. A
union doesn't have a hint which field is in use and therefor the code
generator (at least c_client.py) just creates a generic iterator for the
Doodad union, which fails for TextDoodad and LogoDoodad.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-By: Ran Benita <ran234@gmail.com>
2013-11-14 20:23:30 +09:00
Daniel Martin
2c024996d2 Add note on pretty patches and src/.gitattributes
Add a file HACKING describing howto to prettify patches (their hunk
headers) and add src/.gitattributes, which is necessary for that.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-By: Ran Benita <ran234@gmail.com>
2013-11-14 20:23:24 +09:00
Daniel Martin
508a220f48 xv: Remove obsolete comments in EncodingInfo and QueryEncodings
The padding in EncodingInfo (struct) and QueryEncodings (reply) has been
fixed upstream:
    Xvproto: fix xvEncodingInfo to match actual wire protocol
    http://cgit.freedesktop.org/xorg/proto/videoproto/commit/?id=d970512
and
    Xvproto.h: fix xvQueryEncodingsReply to match actual wire protocol
    http://cgit.freedesktop.org/xorg/proto/videoproto/commit/?id=1a96222

So, we can remove the comments.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Arnaud Fontaine <arnau@debian.org>
2013-11-14 20:23:11 +09:00
Daniel Martin
6e841e1562 xinput: Add XI2 event enum. for event selection
This adds an enumeration 'XIEventMask', which is necessary to select for
XI2 events via the SelectEvent request.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-By: Ran Benita <ran234@gmail.com>
2013-11-14 20:20:05 +09:00
Matt Turner
cfc7f57cd4 xcbgen: Remove tab from xtypes.py.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71418
2013-11-14 20:06:46 +09:00
Keith Packard
29beba6bf0 Update to version 1.9
Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-07 13:51:09 -08:00
Keith Packard
5eedcab927 Add 'fd' element to fields group, fix present Generic event to validate
This fixes 'make check'

Signed-off-by: Keith Packard <keithp@keithp.com>
2013-11-07 13:29:14 -08:00
Keith Packard
24df547b72 Add Present protocol specification
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Harris <pharris@opentext.com>
2013-11-07 05:14:12 -08:00
Keith Packard
ae9c4710e7 Add DRI3
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Harris <pharris@opentext.com>
2013-11-07 05:14:12 -08:00
Keith Packard
2b6b7bb7ba Add MIT-SHM AttachFd and CreateSegment requests
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Harris <pharris@opentext.com>
2013-11-07 05:14:12 -08:00
Keith Packard
c57d265a90 Add support for file descriptor request fields
These are present in the API, but not present on the wire.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-11-07 05:14:12 -08:00
Keith Packard
82263254e1 Define X generic event structure
This is used by libxcb, and was defined explicitly there but it's
cleaner to use the XML specification.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Harris <pharris@opentext.com>
2013-11-06 16:51:00 -08:00
Keith Packard
4d8241c67c Add CARD64/INT64 protocol types
No reason to make people use two 32-bit values when every modern
compiler has native 64-bit objects.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-11-06 16:50:55 -08:00
Keith Packard
84c032775f Move the INT64 types in sync.xml to the sync: namespace
This makes sure we use the crazy sync-specific 64-bit datatype instead
of the global INT64 type

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Harris <pharris@opentext.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-11-06 16:50:31 -08:00
Peter Harris
3e9aa009a2 XKB: Rewrite AXOption
AXOption can be an <enum> instead of a <union>, which is a much simpler
construct.

Signed-off-by: Peter Harris <pharris@opentext.com>
Reviewed-By: Ran Benita <ran234@gmail.com>
2013-11-05 17:03:59 +09:00
Peter Harris
888d0f914e XKB: Fix values of AXFBOpt enum
Signed-off-by: Peter Harris <pharris@opentext.com>
Reviewed-By: Ran Benita <ran234@gmail.com>
2013-11-05 17:03:55 +09:00
Daniel Martin
55c75accec xkb: Fix struct ExtensionDeviceNotify
The field ledId is of type CARD16, not CARD8, see XKBproto.h.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-By: Ran Benita <ran234@gmail.com>
2013-10-11 16:18:32 +09:00
Daniel Martin
d0d5c8adb1 xkb: Pad structs CommonDoodad and SALockDeviceBtn
* CommonDoodad is xkbAnyDoodadWireDesc in XKBproto.h. There it has a
  size of 20 like all Doodads:
    #define sz_xkbAnyDoodadWireDesc 20
  Add the necessary 8 bytes of padding.

* SALockDeviceBtn is an Action. All Actions are handled by the server
  and libX11 with sizeof(xkbActionWireDesc) or
  SIZEOF(xkbActionWireDesc). Which results in a size of 8:
    #define sz_xkbActionWireDesc 8 /* in XKBproto.h */
  Add the necessary 3 bytes of padding.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Ran Benita <ran234@gmail.com>
2013-10-11 16:18:27 +09:00
Daniel Martin
48767a85a5 randr: Fix GetProviderProperty reply
The first field has to be 'format' not a pad and 'num_items' is of type
CARD32.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Arnaud Fontaine <arnau@debian.org>
2013-10-11 16:14:45 +09:00
Daniel Martin
cb2fa837ff Enforce a bit or value in enum items
Do not allow enum items without an explicit bit or value. The value of
an enum item is known when adding the enum to the xml specification.
There's no reason why this information shouldn't be where it belongs to.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Ran Benita <ran234@gmail.com> (and tested)
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2013-08-25 11:22:20 +02:00
Daniel Martin
a702f7e1ca xv: Use explicit enum value
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Ran Benita <ran234@gmail.com> (and tested)
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2013-08-25 11:22:18 +02:00
Daniel Martin
c1887e0594 xproto: Use explicit enum value
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Ran Benita <ran234@gmail.com> (and tested)
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2013-08-25 11:22:16 +02:00
Daniel Martin
abc83cbaea xinput: Use explicit enum value
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Ran Benita <ran234@gmail.com> (and tested)
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2013-08-25 11:22:14 +02:00
Daniel Martin
2185e7710a xfixes: Use explicit enum value
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Ran Benita <ran234@gmail.com> (and tested)
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2013-08-25 11:22:12 +02:00
Daniel Martin
46dc9fb11e xevie: Use explicit enum value
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Ran Benita <ran234@gmail.com> (and tested)
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2013-08-25 11:22:10 +02:00
Daniel Martin
428979f289 sync: Use explicit enum value
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Ran Benita <ran234@gmail.com> (and tested)
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2013-08-25 11:22:08 +02:00
Daniel Martin
41d2b0f667 shape: Use explicit enum value
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Ran Benita <ran234@gmail.com> (and tested)
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2013-08-25 11:22:06 +02:00
Daniel Martin
e84ef3fc4b screensaver: Use explicit enum value
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Ran Benita <ran234@gmail.com> (and tested)
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2013-08-25 11:22:04 +02:00
Daniel Martin
840a5ad835 render: Use explicit enum value
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Ran Benita <ran234@gmail.com> (and tested)
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2013-08-25 11:22:02 +02:00
Daniel Martin
8d0d77a953 dri2: Use explicit enum value
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Ran Benita <ran234@gmail.com> (and tested)
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2013-08-25 11:22:00 +02:00
Daniel Martin
9a58e742e1 randr: Use explicit enum value
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Ran Benita <ran234@gmail.com> (and tested)
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2013-08-25 11:21:58 +02:00
Daniel Martin
a34b8b1878 dpms: Use explicit enum value
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Ran Benita <ran234@gmail.com> (and tested)
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2013-08-25 11:21:55 +02:00
Daniel Martin
b3f6fc4e3a damage: Use explicit enum value
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Ran Benita <ran234@gmail.com> (and tested)
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2013-08-25 11:21:50 +02:00
Daniel Martin
99cea12515 composite: Use explicit enum value
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Ran Benita <ran234@gmail.com> (and tested)
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2013-08-25 11:20:47 +02:00
Ran Benita
bd7708ac10 xkb: Add missing LedClass and BellClass enum values
The protocol encoding says:
http://www.x.org/releases/current/doc/kbproto/xkbproto.html#appD::Common_Types

    KB_LEDCLASSRESULT
        0     KbdFeedbackClass
        4     LedFeedbackClass

    KB_LEDCLASSSPEC
        Encoding same as KB_LEDCLASSRESULT, with the addition of:
        #x0300     XkbDfltXIClass
        #x0500     XkbAllXIClasses

    KB_BELLCLASSRESULT
        0     KbdFeedbackClass
        5     BellFeedbackClass

    KB_BELLCLASSSPEC
        Encoding same as KB_BELLCLASSRESULT, with the addition of:
        #x0300     XkbDfltXIClass

Note that the spec says something slightly different in another section:
http://www.x.org/releases/current/doc/kbproto/xkbproto.html#Common_Types

    KB_LEDCLASSSPEC { KbdFeedbackClass , LedFeedbackClass , DfltXIClass , AllXIClasses , XINone }
    KB_BELLCLASSSPEC    { KbdFeedbackClass , BellFeedbackClass , DfltXIClass , AllXIClasses  }}

From what I could gather, the encoding is the correct one (but I'm not
sure).

Signed-off-by: Ran Benita <ran234@gmail.com>
Reviewed-by: Daniel Martin <consume.noise@gmail.com>
2013-08-15 00:23:54 +02:00
Ran Benita
e56a0599d6 xkb: Add missing 'supported' field to GetNamedIndicator reply
The protocol encoding has it:
http://www.x.org/releases/current/doc/kbproto/xkbproto.html#appD::Requests

    1     CARD8          opcode
    1     15          xkb-opcode
    [...]

    1     1          Reply
    1     CARD8          deviceID
    2     CARD16          sequence number
    [...]
    4     SETofKB_BOOLCTRL          map.ctrls
    1     BOOL          supported
    3               unused

And xkbGetNamedIndicatorReply in XKBproto.h also.

Finally, the server does send it, though it's always TRUE.

Signed-off-by: Ran Benita <ran234@gmail.com>
Reviewed-by: Daniel Martin <consume.noise@gmail.com>
2013-08-15 00:23:46 +02:00
Ran Benita
2cd2d5f0c7 xkb: Unify Overlay1Behavior and Overlay2Behavior
These two structs are used by the server in the exact same way, and are
handled together (see xkb/xkbPrKeyEv.c, XkbKB_Overlay{1,2} handling).
There is no need to use different (and for some reason slightly
different) types for them.

Reviewed-by: Daniel Martin <consume.noise@gmail.com>
Signed-off-by: Ran Benita <ran234@gmail.com>
2013-08-15 00:23:46 +02:00
Ran Benita
e8980ab471 xkb: Change DfltBtnAbsolute to the value used by the server
The spec says:
     #x02     XkbSA_DfltBtnAbsolute
But /usr/include/X11/extensions/XKB.h has:
     #define	XkbSA_DfltBtnAbsolute	(1L << 2)
which is what the server sends.

Note: the XKB spec was changed by Daniel Martin to match the Xlib value.
See kbproto commit db07706cb268d5fe1bc38ef5c0a9f49309068b2c.

Reviewed-by: Daniel Martin <consume.noise@gmail.com>
Signed-off-by: Ran Benita <ran234@gmail.com>
2013-08-15 00:23:46 +02:00
Ran Benita
f4321385e0 xkb: Fix key type map entry field order
In fact, unlike the deleted comment says, both Xlib and the server use
the order as specified in the protocol spec:
http://www.x.org/releases/current/doc/kbproto/xkbproto.html#appD::Requests
(Search for KB_KTMAPENTRY).

Also see struct xkbKTMapEntryWireDesc in
/usr/include/X11/extensions/XKBproto.h

Reviewed-by: Peter Harris <pharris@opentext.com>
Reviewed-by: Daniel Martin <consume.noise@gmail.com>
Signed-off-by: Ran Benita <ran234@gmail.com>
2013-08-15 00:23:46 +02:00
Ran Benita
37d0f55392 xkb: Work around alignment problems in GetNames and GetMap replies
The basic situation is this: a list of CARD8/CARD16s followed by a list
of CARD16/CARD32s. In the current code, the second list is aligned to
1/2 bytes according the size of the first list. However, in some cases
the second list needs to be aligned to 4 bytes per the xkbproto spec:
http://www.x.org/releases/current/doc/kbproto/xkbproto.html#appD::Requests

XkbGetMap reply (xkb-opcode 8):
[...]
a     LISTofCARD8          actsRtrn.count
p               unused,p=pad(a)
8A     LISTofKB_ACTION          actsRtrn.acts
4B     LISTofKB_SETBEHAVIOR          behaviorsRtrn
v     LISTofSETofKEYMASK          vmodsRtrn
p               unused, p=pad(v)
2E     LISTofKB_SETEXPLICIT          explicitRtrn
p               unused,p=pad(2E)
2M     LISTofKB_KEYMODMAP          modmapRtrn
p               unused, p=pad(2M)
[...]

XkbGetNames reply (xkb-opcode 17):
[...]
l     LISTofCARD8          nLevelsPerType, sum of all elements=L
p               unused, p=pad(l)
[...]

The server and Xlib handle this with calls to XkbPaddedSize(), which is
a good way to see where the extra padding is needed.

Signed-off-by: Ran Benita <ran234@gmail.com>
Reviewed-by: Daniel Martin <consume.noise@gmail.com>
2013-08-15 00:23:14 +02:00
Daniel Martin
330bf32140 xproto: Fix GContext error references in documentation
The name of the error is GContext, not GC.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-By: Ran Benita <ran234@gmail.com>
2013-08-15 00:00:53 +02:00
Daniel Martin
fdac6ebb6f xinput: Use BARRIER from xfixes
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
2013-08-15 00:00:53 +02:00
Daniel Martin
37f4ea687f xinput: Unlock uninterpreted lists
The 'uninterpreted_data' lists have been added to pad the structure at
runtime and thereby making lists of such structures iterable.

This is a temporary solution until it is possible to nest a <switch> in
a <struct> correctly.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
2013-08-15 00:00:53 +02:00
Daniel Martin
fae1976b58 xinput: Add XI v2.3
Introduced with v2.3 has been Pointer Barrier support, including a new
request (XIBarrierReleasePointer) and 2 events (Barrier{Hit,Leave}).

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
2013-08-15 00:00:52 +02:00
Daniel Martin
5bfa4c8373 xinput: Add XI v2.2
Introduced with v2.2 has been Multitouch support and therefor 7 new
events: (Raw)Touch{Begin,Update,End} and TouchOwnership.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
2013-08-15 00:00:52 +02:00
Daniel Martin
67a185d69d xinput: Add XI v2.1
Introduced with v2.1 has been Raw event support and therefor 5 new
events: Raw{Key,Button}{Press,Release} and RawMotion.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
2013-08-15 00:00:52 +02:00