[Xcb] [PATCH] XKB: Fix broken events

Josh Triplett josh at joshtriplett.org
Thu Jun 21 11:15:13 PDT 2012


On Thu, Jun 21, 2012 at 12:40:02PM +0100, Daniel Stone wrote:
> XKB events all have exactly the same event number - 0 (from the XKB
> event base).  Within this, they're all multiplexed by the xkbType field,
> which comes immediately after the event type field, before the sequence
> number.  Without this field, the events are pretty much useless, so add
> it manually.
> 
> Signed-off-by: Daniel Stone <daniel at fooishbar.org>
> ---
>  src/xkb.xml |   48 ++++++++++++++++++++++++++++++++++++------------
>  1 file changed, 36 insertions(+), 12 deletions(-)
> 
> diff --git a/src/xkb.xml b/src/xkb.xml
> index e8f4c02..a6ef374 100644
> --- a/src/xkb.xml
> +++ b/src/xkb.xml
> @@ -2593,7 +2593,9 @@ authorization from the authors.
>  
>  	<!-- Events -->
>  
> -	<event name="NewKeyboardNotify" number="0">
> +	<event name="NewKeyboardNotify" number="0" no-sequence-number="true">
> +		<field name="xkbType" type="CARD8" />
> +		<field name="sequence" type="CARD16" />
>  		<field name="time" type="TIMESTAMP" />
>  		<field name="deviceID" type="CARD8" />
>  		<field name="oldDeviceID" type="CARD8" />
> @@ -2607,7 +2609,9 @@ authorization from the authors.
>  		<pad bytes="14" />
>  	</event>
>  
> -	<event name="MapNotify" number="1">
> +	<event name="MapNotify" number="1" no-sequence-number="true">
> +		<field name="xkbType" type="CARD8" />
> +		<field name="sequence" type="CARD16" />

Based on what you described in the commit message, this part also seems
wrong: as you said, all the events have event number 0.  I think you
need a single <event name="XKBEvent" number="0"> with a <switch> on
xkbType, as mentioned in a subsequent mail to the XCB list.

- Josh Triplett


More information about the Xcb mailing list