1 From adaf1adecf5697455e9f3fb0234939113873f959 Mon Sep 17 00:00:00 2001
2 From: Peter Hutterer <peter.hutterer@who-t.net>
3 Date: Mon, 30 Apr 2012 10:01:48 +1000
4 Subject: [PATCH] dix: when disabling a device, release all buttons and keys
6 A suspend-induced device disable may happen before the device gets to see
7 the button release event. On resume, the server's internal state still has
8 some buttons pressed, causing inconsistent behaviour.
10 Force the release and the matching events to be sent to the client.
12 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
13 Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
15 Conflicts:
17 dix/devices.c
18 ---
19 dix/devices.c | 2 ++
20 1 files changed, 2 insertions(+), 0 deletions(-)
22 diff --git a/dix/devices.c b/dix/devices.c
23 index 9624424..b325d17 100644
24 --- a/dix/devices.c
25 +++ b/dix/devices.c
26 @@ -447,6 +447,8 @@ DisableDevice(DeviceIntPtr dev, BOOL sendevent)
27 if (*prev != dev)
28 return FALSE;
30 + ReleaseButtonsAndKeys(dev);
31 +
32 /* float attached devices */
33 if (IsMaster(dev))
34 {
35 --
36 1.7.9.1