[PATCH xserver 03/17] Test: Input: ET_ProximityOut + 1 is ET_DeviceChanged

Peter Hutterer peter.hutterer at who-t.net
Tue Jan 4 19:56:53 PST 2011


On Tue, Dec 28, 2010 at 05:57:54PM +0000, Daniel Stone wrote:
> I'm not exactly sure what this test is supposed to do, but
> ET_ProximityOut + 1 works out to ET_DeviceChanged, so just use that
> instead.

look at the code in dix/eventconvert.c. Up to ET_ProximityOut, the server
returns BadMatch for events that can be generated and will be called for
conversion. All events that aren't covered (and ET_DeviceChanged is one of
them) return BadImplementation. Note that I've had these tests sitting in my
branches for a while before publishing them, so it's quite possible that
when I wrote the code ET_DeviceChanged didn't exist yet and ET_ProximityOut
was the last event in the list. I'm not sure anymore.

so, yes, the +1 is incorrect because we should be checking up to ET_XQuartz,
but this patch isn't it either :)

Cheers,
  Peter

> 
> Signed-off-by: Daniel Stone <daniel at fooishbar.org>
> ---
>  test/input.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/test/input.c b/test/input.c
> index c389a40..e443f75 100644
> --- a/test/input.c
> +++ b/test/input.c
> @@ -274,7 +274,7 @@ static void dix_event_to_core_conversion(void)
>  {
>      dix_event_to_core_fail(0, BadImplementation);
>      dix_event_to_core_fail(1, BadImplementation);
> -    dix_event_to_core_fail(ET_ProximityOut + 1, BadImplementation);
> +    dix_event_to_core_fail(ET_DeviceChanged, BadImplementation);
>      dix_event_to_core_fail(ET_ProximityIn, BadMatch);
>      dix_event_to_core_fail(ET_ProximityOut, BadMatch);
>  
> -- 
> 1.7.2.3


More information about the xorg-devel mailing list