[PATCH app/xev] Add event filter for motion and button events

Peter Hutterer peter.hutterer at who-t.net
Tue Feb 11 19:59:49 PST 2014


On Tue, Feb 11, 2014 at 05:53:27PM +0100, Egbert Eich wrote:
> Signed-off-by: Egbert Eich <eich at freedesktop.org>

patch looks good, I'm just wondering why "mouse" wasn't good enough. I can
understand adding "button" since it filters noise, but "motion" seems
excessive if we already have "mouse".

Cheers,
   Peter


> ---
>  man/xev.man |  2 +-
>  xev.c       | 10 +++++++++-
>  2 files changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/man/xev.man b/man/xev.man
> index 4edec10..b6cb476 100644
> --- a/man/xev.man
> +++ b/man/xev.man
> @@ -62,7 +62,7 @@ The
>  option can be specified multiple times to select multiple types of events.
>  When not specified, all events are selected.
>  Available event masks: keyboard mouse expose visibility structure substructure
> -focus property colormap owner_grab_button randr
> +focus property colormap owner_grab_button randr motion button
>  .TP 8
>  .B \-version
>  This option prints the program version and exits.
> diff --git a/xev.c b/xev.c
> index 45c283f..31ca018 100644
> --- a/xev.c
> +++ b/xev.c
> @@ -890,7 +890,7 @@ usage (const char *errmsg)
>  "    -event event_mask                   select 'event_mask' events",
>  "           Supported event masks: keyboard mouse expose visibility structure",
>  "                                  substructure focus property colormap",
> -"                                  owner_grab_button randr",
> +"                                  owner_grab_button randr button motion",
>  "           This option can be specified multiple times to select multiple",
>  "           event masks.",
>  "",
> @@ -940,6 +940,14 @@ parse_event_mask (const char *s, long event_masks[])
>            LeaveWindowMask | PointerMotionMask | Button1MotionMask |
>            Button2MotionMask | Button3MotionMask | Button4MotionMask |
>            Button5MotionMask | ButtonMotionMask },
> +        { "motion",
> +          EVENT_MASK_INDEX_CORE,
> +          PointerMotionMask | Button1MotionMask |
> +          Button2MotionMask | Button3MotionMask | Button4MotionMask |
> +          Button5MotionMask | ButtonMotionMask },
> +	{ "button",
> +          EVENT_MASK_INDEX_CORE,
> +          ButtonPressMask | ButtonReleaseMask },
>          { "expose",
>            EVENT_MASK_INDEX_CORE,
>            ExposureMask },
> -- 
> 1.8.1.4
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
> 


More information about the xorg-devel mailing list