[Xcb] [PATCH proto 2/3] xkb: Rename enum EventType to EventTypeMask, add EventType

Daniel Martin consume.noise at gmail.com
Fri Aug 30 06:07:28 PDT 2013


On 18 August 2013 16:53, Daniel Martin <consume.noise at gmail.com> wrote:
> The enum EventType had the bit mask items for the SelectEvents request
> and therefor should've been called EventTypeMask. Renaming it to
> EventTypeMask makes it possible to add an enum EventType, which can be
> used to distinguish the sub events later.

NAK. Ran stated, there're already users of the XKB event, they may use the
current EventType values (the bits) to select the events. With this patch, those
possibly existing selects will fail as the values would be replaced
silently, i.e.
before a select with XKB_EVENT_TYPE_NEW_KEYBOARD_NOTIFY would now
have to be XKB_EVENT_TYPE_MASK_NEW_KEYBOARD_NOTIFY. (Didn't verified
the exact names.)

> --- a/src/xkb.xml
> +++ b/src/xkb.xml
> @@ -41,6 +41,21 @@ <enum name="Const">
>         </enum>
>
>         <enum name="EventType">
> +               <item name="NewKeyboardNotify" />
> +               <item name="MapNotify" />
> +               <item name="StateNotify" />
> +               <item name="ControlsNotify" />
> +               <item name="IndicatorStateNotify" />
> +               <item name="IndicatorMapNotify" />
> +               <item name="NamesNotify" />
> +               <item name="CompatMapNotify" />
> +               <item name="BellNotify" />
> +               <item name="ActionMessage" />
> +               <item name="AccessXNotify" />
> +               <item name="ExtensionDeviceNotify" />
> +       </enum>
> +
> +       <enum name="EventTypeMask">
>                 <item name="NewKeyboardNotify">      <bit>0</bit> </item>
>                 <item name="MapNotify">              <bit>1</bit> </item>
>                 <item name="StateNotify">            <bit>2</bit> </item>


More information about the Xcb mailing list