On Tue, Feb 15, 2011 at 11:27:59AM +0000, Daniel Stone wrote:
> When a client has selected for Xi 1.x DeviceStateNotify events, they
> should receive them when a DeviceFocusIn event is generated.  The code
> to do this was there, but an incorrect test (checking the passed-in Xi 2
> event type rather than the event's Xi 1 event type) meant they were
> never being sent.
> 
> Signed-off-by: Daniel Stone <dan...@fooishbar.org>
> ---
>  Xi/exevents.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/Xi/exevents.c b/Xi/exevents.c
> index 5131167..e10cc3a 100644
> --- a/Xi/exevents.c
> +++ b/Xi/exevents.c
> @@ -1278,7 +1278,7 @@ DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, 
> int detail,
>      DeliverEventsToWindow(dev, pWin, (xEvent *) & event, 1,
>                               DeviceFocusChangeMask, NullGrab);
>  
> -    if ((type == DeviceFocusIn) &&
> +    if ((type == XI_FocusIn) &&
>       (wOtherInputMasks(pWin)) &&
>       (wOtherInputMasks(pWin)->inputEvents[dev->id] & DeviceStateNotifyMask))
>      {
> -- 
> 1.7.2.3

for the archives: merged as slightly different version after IRC discussion. 
instead of changing the type to the XI2 type, we simply test event.type for
the XI1 type.
 
Cheers,
  Peter
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to