[PATCH] include: untangle events.h from the SDK headers.

Aaron Plattner aplattner at nvidia.com
Tue Jul 28 20:11:35 PDT 2009


Seems fine to me.

This was in the original events.h already, but doesn't

        enum {
          ET_KeyPress = 2,
          [...]
          ET_Internal = 0xFF /* First byte */
        } EventType;
        
declare a global variable named EventType?
        
        $ nm hw/xfree86/Xorg | grep EventType
        00000000007d4ea8 b EventType

While we're at it, why does DeviceEvent use int plus a comment instead
of EventType for the "type" field?

On Tue, 2009-07-28 at 00:00 -0700, Peter Hutterer wrote:
> InternalEvents shouldn't be used anywhere outside the X server itself. Split
> up into events.h for opaque typedefs for the events needed by various
> headers and eventstr.h for the actual struct definitions.
> 
> eventstr.h must only be included by code that requires internal events and
> is not part of the SDK.
> 
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
>  Xi/exevents.c                  |    1 +
>  dix/devices.c                  |    1 +
>  dix/eventconvert.c             |    2 +-
>  dix/events.c                   |    1 +
>  dix/getevents.c                |    2 +-
>  hw/xfree86/common/xf86DGA.c    |    2 +-
>  hw/xfree86/common/xf86Xinput.c |    1 +
>  include/Makefile.am            |    2 +-
>  include/events.h               |  210 +----------------------------------
>  include/eventstr.h             |  236 ++++++++++++++++++++++++++++++++++++++++
>  include/input.h                |    3 +-
>  mi/mieq.c                      |    1 +
>  xkb/xkbAccessX.c               |    1 +
>  xkb/xkbActions.c               |    1 +
>  xkb/xkbPrKeyEv.c               |    1 +
>  xkb/xkbUtils.c                 |    1 +
>  16 files changed, 255 insertions(+), 211 deletions(-)
>  create mode 100644 include/eventstr.h
> 
> diff --git a/Xi/exevents.c b/Xi/exevents.c
> index 984bc07..5c43266 100644
> --- a/Xi/exevents.c
> +++ b/Xi/exevents.c
> @@ -76,6 +76,7 @@ SOFTWARE.
>  #include "xace.h"
>  #include "xiquerydevice.h" /* For List*Info */
>  #include "eventconvert.h"
> +#include "eventstr.h"
> 
>  #include <X11/extensions/XKBproto.h>
>  #include "xkbsrv.h"
> diff --git a/dix/devices.c b/dix/devices.c
> index 4d006b1..32fd445 100644
> --- a/dix/devices.c
> +++ b/dix/devices.c
> @@ -72,6 +72,7 @@ SOFTWARE.
>  #include "swaprep.h"
>  #include "dixevents.h"
>  #include "mipointer.h"
> +#include "eventstr.h"
> 
>  #include <X11/extensions/XI.h>
>  #include <X11/extensions/XI2.h>
> diff --git a/dix/eventconvert.c b/dix/eventconvert.c
> index 039a17f..943178e 100644
> --- a/dix/eventconvert.c
> +++ b/dix/eventconvert.c
> @@ -42,7 +42,7 @@
>  #include "dix.h"
>  #include "inputstr.h"
>  #include "misc.h"
> -#include "events.h"
> +#include "eventstr.h"
>  #include "exglobals.h"
>  #include "eventconvert.h"
>  #include "xiquerydevice.h"
> diff --git a/dix/events.c b/dix/events.c
> index f50229a..a6a1075 100644
> --- a/dix/events.c
> +++ b/dix/events.c
> @@ -162,6 +162,7 @@ typedef const char *string;
>  #include "geext.h"
>  #include "geint.h"
> 
> +#include "eventstr.h"
>  #include "enterleave.h"
>  #include "eventconvert.h"
> 
> diff --git a/dix/getevents.c b/dix/getevents.c
> index 9895642..ffd7497 100644
> --- a/dix/getevents.c
> +++ b/dix/getevents.c
> @@ -43,7 +43,7 @@
>  #include "globals.h"
>  #include "dixevents.h"
>  #include "mipointer.h"
> -#include "events.h"
> +#include "eventstr.h"
>  #include "eventconvert.h"
> 
>  #include <X11/extensions/XKBproto.h>
> diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c
> index 25aa4f5..380888d 100644
> --- a/hw/xfree86/common/xf86DGA.c
> +++ b/hw/xfree86/common/xf86DGA.c
> @@ -46,7 +46,7 @@
>  #include "xf86Xinput.h"
>  #include "exglobals.h"
>  #include "exevents.h"
> -#include "events.h"
> +#include "eventstr.h"
>  #include "eventconvert.h"
> 
>  #include "mi.h"
> diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
> index b4169cf..7b5904e 100644
> --- a/hw/xfree86/common/xf86Xinput.c
> +++ b/hw/xfree86/common/xf86Xinput.c
> @@ -72,6 +72,7 @@
> 
>  #include "exevents.h"  /* AddInputDevice */
>  #include "exglobals.h"
> +#include "eventstr.h"
> 
>  #include "extnsionst.h"
> 
> diff --git a/include/Makefile.am b/include/Makefile.am
> index 50b75c2..f8eef53 100644
> --- a/include/Makefile.am
> +++ b/include/Makefile.am
> @@ -65,4 +65,4 @@ AM_CFLAGS = $(DIX_CFLAGS)
> 
>  EXTRA_DIST =   \
>         dix-config-apple-verbatim.h \
> -       eventconvert.h
> +       eventconvert.h eventstr.h
> diff --git a/include/events.h b/include/events.h
> index 4b0c6dc..9f6a94c 100644
> --- a/include/events.h
> +++ b/include/events.h
> @@ -24,212 +24,12 @@
> 
>  #ifndef EVENTS_H
>  #define EVENTS_H
> -
> -/**
> - * @file events.h
> - * This file describes the event structures used internally by the X
> - * server during event generation and event processing.
> - *
> - * When are internal events used?
> - * Events from input devices are stored as internal events in the EQ and
> - * processed as internal events until late in the processing cycle. Only then
> - * do they switch to their respective wire events.
> - */
> -
> -/**
> - * Event types. Used exclusively internal to the server, not visible on the
> - * protocol.
> - *
> - * Note: Keep KeyPress to Motion aligned with the core events.
> - *       Keep ET_Raw* in the same order as KeyPress - Motion
> - */
> -enum {
> -    ET_KeyPress = 2,
> -    ET_KeyRelease,
> -    ET_ButtonPress,
> -    ET_ButtonRelease,
> -    ET_Motion,
> -    ET_Enter,
> -    ET_Leave,
> -    ET_FocusIn,
> -    ET_FocusOut,
> -    ET_ProximityIn,
> -    ET_ProximityOut,
> -    ET_DeviceChanged,
> -    ET_Hierarchy,
> -#if XFreeXDGA
> -    ET_DGAEvent,
> -#endif
> -    ET_RawKeyPress,
> -    ET_RawKeyRelease,
> -    ET_RawButtonPress,
> -    ET_RawButtonRelease,
> -    ET_RawMotion,
> -    ET_Internal = 0xFF /* First byte */
> -} EventType;
> -
> -#define CHECKEVENT(ev) if (ev && ((InternalEvent*)(ev))->any.header != 0xFF) \
> -                          FatalError("Wrong event type %d.\n", \
> -                                     ((InternalEvent*)(ev))->any.header);
> -
> -/**
> - * Used for ALL input device events internal in the server until
> - * copied into the matching protocol event.
> - *
> - * Note: We only use the device id because the DeviceIntPtr may become invalid while
> - * the event is in the EQ.
> - */
> -typedef struct
> -{
> -    unsigned char header; /**< Always ET_Internal */
> -    int type;             /**< One of EventType */
> -    int length;           /**< Length in bytes */
> -    Time time;            /**< Time in ms */
> -    int deviceid;         /**< Device to post this event for */
> -    int sourceid;         /**< The physical source device */
> -    union {
> -        uint32_t button;  /**< Button number */
> -        uint32_t key;     /**< Key code */
> -    } detail;
> -    uint16_t root_x;      /**< Pos relative to root window in integral data */
> -    float root_x_frac;    /**< Pos relative to root window in frac part */
> -    uint16_t root_y;      /**< Pos relative to root window in integral part */
> -    float root_y_frac;    /**< Pos relative to root window in frac part */
> -    uint8_t    buttons[(MAX_BUTTONS + 7)/8]; /**< Button mask */
> -    struct {
> -        uint8_t  mask[(MAX_VALUATORS + 7)/8]; /**< Valuator mask */
> -        uint8_t  mode[(MAX_VALUATORS + 7)/8]; /**< Valuator mode (Abs or Rel)*/
> -        uint32_t data[MAX_VALUATORS];         /**< Valuator data */
> -        int32_t  data_frac[MAX_VALUATORS];    /**< Fractional part for data */
> -    } valuators;
> -    struct {
> -        uint32_t base;    /**< XKB base modifiers */
> -        uint32_t latched; /**< XKB latched modifiers */
> -        uint32_t locked;  /**< XKB locked modifiers */
> -        uint32_t effective;/**< XKB effective modifiers */
> -    } mods;
> -    struct {
> -        uint8_t base;    /**< XKB base group */
> -        uint8_t latched; /**< XKB latched group */
> -        uint8_t locked;  /**< XKB locked group */
> -        uint8_t effective;/**< XKB effective group */
> -    } group;
> -    Window      root; /**< Root window of the event */
> -    int corestate;    /**< Core key/button state BEFORE the event */
> -} DeviceEvent;
> -
> -
> -/* Flags used in DeviceChangedEvent to signal if new/old slave is present. */
> -#define DEVCHANGE_HAS_OLD_SLAVE 0x1
> -#define DEVCHANGE_HAS_NEW_SLAVE 0x2
> -/* Flags used in DeviceChangedEvent to signal whether the event was a
> - * pointer event or a keyboard event */
> -#define DEVCHANGE_POINTER_EVENT 0x4
> -#define DEVCHANGE_KEYBOARD_EVENT 0x8
> -/* device capabilities changed */
> -#define DEVCHANGE_DEVICE_CHANGE 0x10
> -
> -/**
> - * Sent whenever a device's capabilities have changed.
> - */
> -typedef struct
> -{
> -    unsigned char header; /**< Always ET_Internal */
> -    int type;             /**< ET_DeviceChanged */
> -    int length;           /**< Length in bytes */
> -    Time time;            /**< Time in ms */
> -    int deviceid;         /**< Device whose capabilities have changed */
> -    int flags;            /**< Mask of ::HAS_OLD_SLAVE, ::HAS_NEW_SLAVE,
> -                               ::POINTER_EVENT, ::KEYBOARD_EVENT */
> -    /** If flags & HAS_OLD_SLAVE is set, old_slaveid specifies SD previously
> -     * attached to this device. */
> -    int old_slaveid;
> -    /** If flags & HAS_OLD_SLAVE is set, old_slaveid specifies device now
> -     * attached to this device. */
> -    int new_slaveid;
> -
> -    struct {
> -        int num_buttons;        /**< Number of buttons */
> -        Atom names[MAX_BUTTONS];/**< Button names */
> -    } buttons;
> -
> -    int num_valuators;          /**< Number of axes */
> -    struct {
> -        uint32_t min;           /**< Minimum value */
> -        uint32_t max;           /**< Maximum value */
> -        /* FIXME: frac parts of min/max */
> -        uint32_t resolution;    /**< Resolution counts/m */
> -        uint8_t mode;           /**< Relative or Absolute */
> -        Atom name;              /**< Axis name */
> -    } valuators[MAX_VALUATORS];
> -
> -    struct {
> -        int min_keycode;
> -        int max_keycode;
> -    } keys;
> -} DeviceChangedEvent;
> -
> -#if XFreeXDGA
> -/**
> - * DGAEvent, used by DGA to intercept and emulate input events.
> - */
> -typedef struct
> -{
> -    unsigned char header; /**<  Always ET_Internal */
> -    int type;             /**<  ET_DGAEvent */
> -    int length;           /**<  Length in bytes */
> -    Time time;            /**<  Time in ms */
> -    int subtype;          /**<  KeyPress, KeyRelease, ButtonPress,
> -                                ButtonRelease, MotionNotify */
> -    int detail;           /**<  Relative x coordinate */
> -    int dx;               /**<  Relative x coordinate */
> -    int dy;               /**<  Relative y coordinate */
> -    int screen;           /**<  Screen number this event applies to */
> -    uint16_t state;       /**<  Core modifier/button state */
> -} DGAEvent;
> -#endif
> -
> -/**
> - * Raw event, contains the data as posted by the device.
> - */
> -typedef struct
> -{
> -    unsigned char header; /**<  Always ET_Internal */
> -    int type;             /**<  ET_Raw */
> -    int length;           /**<  Length in bytes */
> -    Time time;            /**<  Time in ms */
> -    int deviceid;         /**< Device to post this event for */
> -    int sourceid;         /**< The physical source device */
> -    union {
> -        uint32_t button;  /**< Button number */
> -        uint32_t key;     /**< Key code */
> -    } detail;
> -    struct {
> -        uint8_t  mask[(MAX_VALUATORS + 7)/8]; /**< Valuator mask */
> -        int32_t  data[MAX_VALUATORS];         /**< Valuator data */
> -        int32_t  data_frac[MAX_VALUATORS];    /**< Fractional part for data */
> -        int32_t  data_raw[MAX_VALUATORS];     /**< Valuator data as posted */
> -        int32_t  data_raw_frac[MAX_VALUATORS];/**< Fractional part for data_raw */
> -    } valuators;
> -} RawDeviceEvent;
> -
> -/**
> - * Event type used inside the X server for input event
> - * processing.
> - */
> -typedef union {
> -        struct {
> -            unsigned char header; /**< Always ET_Internal */
> -            int type;             /**< One of ET_* */
> -            int length;           /**< Length in bytes */
> -            Time time;            /**< Time in ms. */
> -        } any;
> -        DeviceEvent device;
> -        DeviceChangedEvent changed;
> +typedef struct _DeviceEvent DeviceEvent;
> +typedef struct _DeviceChangedEvent DeviceChangedEvent;
>  #if XFreeXDGA
> -        DGAEvent dga;
> +typedef struct _DGAEvent DGAEvent;
>  #endif
> -        RawDeviceEvent raw;
> -} InternalEvent;
> +typedef struct _RawDeviceEvent RawDeviceEvent;
> +typedef union _InternalEvent InternalEvent;
> 
>  #endif
> diff --git a/include/eventstr.h b/include/eventstr.h
> new file mode 100644
> index 0000000..3eefc05
> --- /dev/null
> +++ b/include/eventstr.h
> @@ -0,0 +1,236 @@
> +/*
> + * Copyright © 2009 Red Hat, Inc.
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice (including the next
> + * paragraph) shall be included in all copies or substantial portions of the
> + * Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
> + * DEALINGS IN THE SOFTWARE.
> + *
> + */
> +
> +#ifndef EVENTSTR_H
> +#define EVENTSTR_H
> +
> +#include <events.h>
> +/**
> + * @file events.h
> + * This file describes the event structures used internally by the X
> + * server during event generation and event processing.
> + *
> + * When are internal events used?
> + * Events from input devices are stored as internal events in the EQ and
> + * processed as internal events until late in the processing cycle. Only then
> + * do they switch to their respective wire events.
> + */
> +
> +/**
> + * Event types. Used exclusively internal to the server, not visible on the
> + * protocol.
> + *
> + * Note: Keep KeyPress to Motion aligned with the core events.
> + *       Keep ET_Raw* in the same order as KeyPress - Motion
> + */
> +enum {
> +    ET_KeyPress = 2,
> +    ET_KeyRelease,
> +    ET_ButtonPress,
> +    ET_ButtonRelease,
> +    ET_Motion,
> +    ET_Enter,
> +    ET_Leave,
> +    ET_FocusIn,
> +    ET_FocusOut,
> +    ET_ProximityIn,
> +    ET_ProximityOut,
> +    ET_DeviceChanged,
> +    ET_Hierarchy,
> +#if XFreeXDGA
> +    ET_DGAEvent,
> +#endif
> +    ET_RawKeyPress,
> +    ET_RawKeyRelease,
> +    ET_RawButtonPress,
> +    ET_RawButtonRelease,
> +    ET_RawMotion,
> +    ET_Internal = 0xFF /* First byte */
> +} EventType;
> +
> +#define CHECKEVENT(ev) if (ev && ((InternalEvent*)(ev))->any.header != 0xFF) \
> +                          FatalError("Wrong event type %d.\n", \
> +                                     ((InternalEvent*)(ev))->any.header);
> +
> +/**
> + * Used for ALL input device events internal in the server until
> + * copied into the matching protocol event.
> + *
> + * Note: We only use the device id because the DeviceIntPtr may become invalid while
> + * the event is in the EQ.
> + */
> +struct _DeviceEvent
> +{
> +    unsigned char header; /**< Always ET_Internal */
> +    int type;             /**< One of EventType */
> +    int length;           /**< Length in bytes */
> +    Time time;            /**< Time in ms */
> +    int deviceid;         /**< Device to post this event for */
> +    int sourceid;         /**< The physical source device */
> +    union {
> +        uint32_t button;  /**< Button number */
> +        uint32_t key;     /**< Key code */
> +    } detail;
> +    uint16_t root_x;      /**< Pos relative to root window in integral data */
> +    float root_x_frac;    /**< Pos relative to root window in frac part */
> +    uint16_t root_y;      /**< Pos relative to root window in integral part */
> +    float root_y_frac;    /**< Pos relative to root window in frac part */
> +    uint8_t    buttons[(MAX_BUTTONS + 7)/8]; /**< Button mask */
> +    struct {
> +        uint8_t  mask[(MAX_VALUATORS + 7)/8]; /**< Valuator mask */
> +        uint8_t  mode[(MAX_VALUATORS + 7)/8]; /**< Valuator mode (Abs or Rel)*/
> +        uint32_t data[MAX_VALUATORS];         /**< Valuator data */
> +        int32_t  data_frac[MAX_VALUATORS];    /**< Fractional part for data */
> +    } valuators;
> +    struct {
> +        uint32_t base;    /**< XKB base modifiers */
> +        uint32_t latched; /**< XKB latched modifiers */
> +        uint32_t locked;  /**< XKB locked modifiers */
> +        uint32_t effective;/**< XKB effective modifiers */
> +    } mods;
> +    struct {
> +        uint8_t base;    /**< XKB base group */
> +        uint8_t latched; /**< XKB latched group */
> +        uint8_t locked;  /**< XKB locked group */
> +        uint8_t effective;/**< XKB effective group */
> +    } group;
> +    Window      root; /**< Root window of the event */
> +    int corestate;    /**< Core key/button state BEFORE the event */
> +};
> +
> +
> +/* Flags used in DeviceChangedEvent to signal if new/old slave is present. */
> +#define DEVCHANGE_HAS_OLD_SLAVE 0x1
> +#define DEVCHANGE_HAS_NEW_SLAVE 0x2
> +/* Flags used in DeviceChangedEvent to signal whether the event was a
> + * pointer event or a keyboard event */
> +#define DEVCHANGE_POINTER_EVENT 0x4
> +#define DEVCHANGE_KEYBOARD_EVENT 0x8
> +/* device capabilities changed */
> +#define DEVCHANGE_DEVICE_CHANGE 0x10
> +
> +/**
> + * Sent whenever a device's capabilities have changed.
> + */
> +struct _DeviceChangedEvent
> +{
> +    unsigned char header; /**< Always ET_Internal */
> +    int type;             /**< ET_DeviceChanged */
> +    int length;           /**< Length in bytes */
> +    Time time;            /**< Time in ms */
> +    int deviceid;         /**< Device whose capabilities have changed */
> +    int flags;            /**< Mask of ::HAS_OLD_SLAVE, ::HAS_NEW_SLAVE,
> +                               ::POINTER_EVENT, ::KEYBOARD_EVENT */
> +    /** If flags & HAS_OLD_SLAVE is set, old_slaveid specifies SD previously
> +     * attached to this device. */
> +    int old_slaveid;
> +    /** If flags & HAS_OLD_SLAVE is set, old_slaveid specifies device now
> +     * attached to this device. */
> +    int new_slaveid;
> +
> +    struct {
> +        int num_buttons;        /**< Number of buttons */
> +        Atom names[MAX_BUTTONS];/**< Button names */
> +    } buttons;
> +
> +    int num_valuators;          /**< Number of axes */
> +    struct {
> +        uint32_t min;           /**< Minimum value */
> +        uint32_t max;           /**< Maximum value */
> +        /* FIXME: frac parts of min/max */
> +        uint32_t resolution;    /**< Resolution counts/m */
> +        uint8_t mode;           /**< Relative or Absolute */
> +        Atom name;              /**< Axis name */
> +    } valuators[MAX_VALUATORS];
> +
> +    struct {
> +        int min_keycode;
> +        int max_keycode;
> +    } keys;
> +};
> +
> +#if XFreeXDGA
> +/**
> + * DGAEvent, used by DGA to intercept and emulate input events.
> + */
> +struct _DGAEvent
> +{
> +    unsigned char header; /**<  Always ET_Internal */
> +    int type;             /**<  ET_DGAEvent */
> +    int length;           /**<  Length in bytes */
> +    Time time;            /**<  Time in ms */
> +    int subtype;          /**<  KeyPress, KeyRelease, ButtonPress,
> +                                ButtonRelease, MotionNotify */
> +    int detail;           /**<  Relative x coordinate */
> +    int dx;               /**<  Relative x coordinate */
> +    int dy;               /**<  Relative y coordinate */
> +    int screen;           /**<  Screen number this event applies to */
> +    uint16_t state;       /**<  Core modifier/button state */
> +};
> +#endif
> +
> +/**
> + * Raw event, contains the data as posted by the device.
> + */
> +struct _RawDeviceEvent
> +{
> +    unsigned char header; /**<  Always ET_Internal */
> +    int type;             /**<  ET_Raw */
> +    int length;           /**<  Length in bytes */
> +    Time time;            /**<  Time in ms */
> +    int deviceid;         /**< Device to post this event for */
> +    int sourceid;         /**< The physical source device */
> +    union {
> +        uint32_t button;  /**< Button number */
> +        uint32_t key;     /**< Key code */
> +    } detail;
> +    struct {
> +        uint8_t  mask[(MAX_VALUATORS + 7)/8]; /**< Valuator mask */
> +        int32_t  data[MAX_VALUATORS];         /**< Valuator data */
> +        int32_t  data_frac[MAX_VALUATORS];    /**< Fractional part for data */
> +        int32_t  data_raw[MAX_VALUATORS];     /**< Valuator data as posted */
> +        int32_t  data_raw_frac[MAX_VALUATORS];/**< Fractional part for data_raw */
> +    } valuators;
> +};
> +
> +/**
> + * Event type used inside the X server for input event
> + * processing.
> + */
> +union _InternalEvent {
> +        struct {
> +            unsigned char header; /**< Always ET_Internal */
> +            int type;             /**< One of ET_* */
> +            int length;           /**< Length in bytes */
> +            Time time;            /**< Time in ms. */
> +        } any;
> +        DeviceEvent device;
> +        DeviceChangedEvent changed;
> +#if XFreeXDGA
> +        DGAEvent dga;
> +#endif
> +        RawDeviceEvent raw;
> +};
> +
> +#endif
> diff --git a/include/input.h b/include/input.h
> index 40ba660..e962696 100644
> --- a/include/input.h
> +++ b/include/input.h
> @@ -54,6 +54,7 @@ SOFTWARE.
>  #include <X11/Xproto.h>
>  #include "window.h"     /* for WindowPtr */
>  #include "xkbrules.h"
> +#include "events.h"
> 
>  #define DEVICE_INIT    0
>  #define DEVICE_ON      1
> @@ -96,8 +97,6 @@ SOFTWARE.
>  #define RevertToFollowKeyboard 3
>  #endif
> 
> -#include "events.h"
> -
>  typedef unsigned long Leds;
>  typedef struct _OtherClients *OtherClientsPtr;
>  typedef struct _InputClients *InputClientsPtr;
> diff --git a/mi/mieq.c b/mi/mieq.c
> index 976fac9..539a99f 100644
> --- a/mi/mieq.c
> +++ b/mi/mieq.c
> @@ -51,6 +51,7 @@ in this Software without prior written authorization from The Open Group.
>  # include   <X11/extensions/geproto.h>
>  # include   "extinit.h"
>  # include   "exglobals.h"
> +# include   "eventstr.h"
> 
>  #ifdef DPMSExtension
>  # include "dpmsproc.h"
> diff --git a/xkb/xkbAccessX.c b/xkb/xkbAccessX.c
> index f0f7578..7df8e06 100644
> --- a/xkb/xkbAccessX.c
> +++ b/xkb/xkbAccessX.c
> @@ -36,6 +36,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
>  #include "exglobals.h"
>  #include <X11/extensions/XIproto.h>
>  #include "inputstr.h"
> +#include "eventstr.h"
>  #include <xkbsrv.h>
>  #if !defined(WIN32)
>  #include <sys/time.h>
> diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c
> index 5909b06..9c3184a 100644
> --- a/xkb/xkbActions.c
> +++ b/xkb/xkbActions.c
> @@ -36,6 +36,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
>  #include "misc.h"
>  #include "inputstr.h"
>  #include "exevents.h"
> +#include "eventstr.h"
>  #include <xkbsrv.h>
>  #include "xkb.h"
>  #include <ctype.h>
> diff --git a/xkb/xkbPrKeyEv.c b/xkb/xkbPrKeyEv.c
> index effb0ea..e01282d 100644
> --- a/xkb/xkbPrKeyEv.c
> +++ b/xkb/xkbPrKeyEv.c
> @@ -36,6 +36,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
>  #include "misc.h"
>  #include "inputstr.h"
>  #include "exevents.h"
> +#include "eventstr.h"
>  #include <xkbsrv.h>
>  #include <ctype.h>
>  #include "events.h"
> diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
> index e25247f..06da1d5 100644
> --- a/xkb/xkbUtils.c
> +++ b/xkb/xkbUtils.c
> @@ -62,6 +62,7 @@ DEALINGS IN THE SOFTWARE.
>  #include <X11/keysym.h>
>  #include "misc.h"
>  #include "inputstr.h"
> +#include "eventstr.h"
> 
>  #define        XKBSRV_NEED_FILE_FUNCS
>  #include <xkbsrv.h>
> --
> 1.6.3.rc1.2.g0164.dirty
> 

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------


More information about the xorg-devel mailing list