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 <[email protected]>
> ---
>  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
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to