[PATCH] Drop valuator mask argument from GetKeyboardEvents

Daniel Stone daniel at fooishbar.org
Tue Dec 16 00:15:31 PST 2014


Hi,

On 16 December 2014 at 04:43, Peter Hutterer <peter.hutterer at who-t.net>
wrote:
>
> @@ -1157,18 +1139,6 @@ GetKeyboardEvents(InternalEvent *events,
> DeviceIntPtr pDev, int type,
>          set_key_up(pDev, key_code, KEY_POSTED);
>      }
>
> -    clipValuators(pDev, &mask);
> -
> -    set_valuators(pDev, event, &mask);
> -
> -    if (!IsFloating(pDev)) {
> -        DeviceIntPtr master = GetMaster(pDev, MASTER_POINTER);
> -
> -        event_set_root_coordinates(event,
> -                                   master->last.valuators[0],
> -                                   master->last.valuators[1]);
> -    }
> -
>      return num_events;
>  }
>

Are you sure this is right? Won't this change it from returning root_[xy]
with current MD pointer co-ordinates to nothing/rubbish?


> diff --git a/hw/xfree86/common/xf86Module.h
> b/hw/xfree86/common/xf86Module.h
> index e68fe9c..25a8869 100644
> --- a/hw/xfree86/common/xf86Module.h
> +++ b/hw/xfree86/common/xf86Module.h
> @@ -81,7 +81,7 @@ typedef enum {
>   */
>  #define ABI_ANSIC_VERSION      SET_ABI_VERSION(0, 4)
>  #define ABI_VIDEODRV_VERSION   SET_ABI_VERSION(19, 0)
> -#define ABI_XINPUT_VERSION     SET_ABI_VERSION(21, 0)
> +#define ABI_XINPUT_VERSION     SET_ABI_VERSION(22, 0)
>  #define ABI_EXTENSION_VERSION  SET_ABI_VERSION(9, 0)
>  #define ABI_FONT_VERSION       SET_ABI_VERSION(0, 6)
>
> diff --git a/hw/xfree86/common/xf86Xinput.c
> b/hw/xfree86/common/xf86Xinput.c
> index 1fb5b16..9fa3dc4 100644
> --- a/hw/xfree86/common/xf86Xinput.c
> +++ b/hw/xfree86/common/xf86Xinput.c
> @@ -1326,47 +1326,21 @@ xf86PostButtonEventM(DeviceIntPtr device,
>  }
>
>  void
> -xf86PostKeyEvent(DeviceIntPtr device,
> -                 unsigned int key_code,
> -                 int is_down,
> -                 int is_absolute, int first_valuator, int num_valuators,
> ...)
> +xf86PostKeyEvent(DeviceIntPtr device, unsigned int key_code, int is_down)


I'd probably lean towards leaving the xf86 wrappers alone (with a BUG_ON if
you must); not sure the annoyance of an ABI break to essentially preserve
the status quo is worth it tbh.

Cheers,
Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20141216/4cf3df8d/attachment.html>


More information about the xorg-devel mailing list