~ubuntu-branches/ubuntu/precise/xserver-xorg-input-evdev/precise-proposed

« back to all changes in this revision

Viewing changes to debian/patches/102-fix_valuator_proximity_handling.patch

  • Committer: Package Import Robot
  • Author(s): Chase Douglas
  • Date: 2012-01-10 15:00:27 UTC
  • mfrom: (1.1.18) (24.1.12 experimental)
  • Revision ID: package-import@ubuntu.com-20120110150027-de7p2hpnb044d4vm
Tags: 1:2.6.99.901-1ubuntu2
* Patch configure.ac for Ubuntu Xi 2.2 support
  - 0004-xi22-ubuntu.patch
* Remove obsolete --enable-multitouch configure flag

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From 6139f903bc1942b160d3d94828d9aa66d9d3febd Mon Sep 17 00:00:00 2001
2
 
From: Chase Douglas <chase.douglas@canonical.com>
3
 
Date: Thu, 14 Apr 2011 15:48:10 -0400
4
 
Subject: [PATCH] Copy out of proximity values into current values selectively
5
 
 
6
 
Otherwise, an event that causes us to go into proximity with some new
7
 
valuator values will retain some old valuator values from when last in
8
 
proximity. This change ensures that all values posted while out of
9
 
proximity are accounted for.
10
 
 
11
 
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
12
 
---
13
 
 src/evdev.c |   15 ++++++++-------
14
 
 1 files changed, 8 insertions(+), 7 deletions(-)
15
 
 
16
 
diff --git a/src/evdev.c b/src/evdev.c
17
 
index b767b0e..f31f492 100644
18
 
--- a/src/evdev.c
19
 
+++ b/src/evdev.c
20
 
@@ -525,13 +525,14 @@ EvdevProcessProximityState(InputInfoPtr pInfo)
21
 
     {
22
 
         /* We're about to go into/out of proximity but have no abs events
23
 
          * within the EV_SYN. Use the last coordinates we have. */
24
 
-        if (!pEvdev->abs_queued &&
25
 
-            valuator_mask_num_valuators(pEvdev->prox) > 0)
26
 
-        {
27
 
-            valuator_mask_copy(pEvdev->vals, pEvdev->prox);
28
 
-            valuator_mask_zero(pEvdev->prox);
29
 
-            pEvdev->abs_queued = 1;
30
 
-        }
31
 
+        for (i = 0; i < valuator_mask_size(pEvdev->prox); i++)
32
 
+            if (!valuator_mask_isset(pEvdev->vals, i) &&
33
 
+                valuator_mask_isset(pEvdev->prox, i))
34
 
+                valuator_mask_set(pEvdev->vals, i,
35
 
+                                  valuator_mask_get(pEvdev->prox, i));
36
 
+        valuator_mask_zero(pEvdev->prox);
37
 
+
38
 
+        pEvdev->abs_queued = valuator_mask_size(pEvdev->vals);
39
 
     }
40
 
 
41
 
     pEvdev->in_proximity = prox_state;
42
 
1.7.4.1
43