[PATCH] dix: when disabling a device, release all buttons and keys
Chase Douglas
chase.douglas at canonical.com
Mon Apr 30 10:46:20 PDT 2012
On 04/29/2012 07:52 PM, Peter Hutterer wrote:
> A suspend-induced device disable may happen before the device gets to see
> the button release event. On resume, the server's internal state still has
> some buttons pressed, causing inconsistent behaviour.
>
> Force the release and the matching events to be sent to the client.
>
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
> dix/devices.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/dix/devices.c b/dix/devices.c
> index 600f8b7..7f38865 100644
> --- a/dix/devices.c
> +++ b/dix/devices.c
> @@ -437,6 +437,7 @@ DisableDevice(DeviceIntPtr dev, BOOL sendevent)
> if (*prev != dev)
> return FALSE;
>
> + ReleaseButtonsAndKeys(dev);
> SyncRemoveDeviceIdleTime(dev->idle_counter);
> dev->idle_counter = NULL;
>
Looks good to me.
Reviewed-by: Chase Douglas <chase.douglas at canonical.com>
More information about the xorg-devel
mailing list