~ubuntu-branches/ubuntu/quantal/xorg-server/quantal-updates

« back to all changes in this revision

Viewing changes to debian/patches/601-Store-window-pointer-in-touch-listener-record.patch

  • Committer: Package Import Robot
  • Author(s): Chase Douglas
  • Date: 2012-03-07 15:36:20 UTC
  • Revision ID: package-import@ubuntu.com-20120307153620-v2789zwz1n3irs3b
Tags: 2:1.11.4-0ubuntu5
* Update to 1.12 input stack 
* Drop input patches that have been merged upstream:
  - 600-Revert-dix-deduplicate-callers-of-DeliverDeviceEvent.patch
  - 601-Store-window-pointer-in-touch-listener-record.patch
  - 602-Factor-out-TouchEnd-generation-and-delivery.patch
  - 603-Export-TouchEventRejected-as-TouchRejected.patch
  - 604-Move-AllowTouch-to-dix-touch.c-and-rename-to-TouchAc.patch
  - 605-Check-for-proper-window-ID-when-processing-touch-all.patch
  - 606-Implement-early-touch-reject.patch
  - 607-Implement-touch-early-accept.patch
  - 608-dix-fix-an-out-of-memory-crash.patch
  - 609-Xi-handle-new-XIAllowEvents-request-in-inputproto-2..patch
  - 610-Fix-scrolling.patch
  - 611-Fix-touch-punt-crash.patch
  - 612-Fix-vcp-touches-corruption.patch
  - 613-Keep-vcp-touch-class.patch
* Fix indirect touch grab handling (LP: #929408)
  - Add temporary patch 501_touch_accept_end.patch
  - Add temporary patch 502_indirect_touch_window_set.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From ab60cadc2afb9d8882144e30fde11c3ef0f999cd Mon Sep 17 00:00:00 2001
2
 
From: Chase Douglas <chase.douglas@canonical.com>
3
 
Date: Fri, 3 Feb 2012 16:19:05 -0800
4
 
Subject: [PATCH] Store window pointer in touch listener record
5
 
 
6
 
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
7
 
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
8
 
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
9
 
---
10
 
 dix/touch.c        |   16 ++++++++++------
11
 
 include/input.h    |    3 ++-
12
 
 include/inputstr.h |    1 +
13
 
 3 files changed, 13 insertions(+), 7 deletions(-)
14
 
 
15
 
diff --git a/dix/touch.c b/dix/touch.c
16
 
index db0bf33..b42859d 100644
17
 
--- a/dix/touch.c
18
 
+++ b/dix/touch.c
19
 
@@ -697,12 +697,14 @@ TouchResourceIsOwner(TouchPointInfoPtr ti, XID resource)
20
 
  */
21
 
 void
22
 
 TouchAddListener(TouchPointInfoPtr ti, XID resource, enum InputLevel level,
23
 
-                 enum TouchListenerType type, enum TouchListenerState state)
24
 
+                 enum TouchListenerType type, enum TouchListenerState state,
25
 
+                 WindowPtr window)
26
 
 {
27
 
     ti->listeners[ti->num_listeners].listener = resource;
28
 
     ti->listeners[ti->num_listeners].level = level;
29
 
     ti->listeners[ti->num_listeners].state = state;
30
 
     ti->listeners[ti->num_listeners].type = type;
31
 
+    ti->listeners[ti->num_listeners].window = window;
32
 
     ti->num_listeners++;
33
 
 }
34
 
 
35
 
@@ -753,7 +755,7 @@ TouchAddGrabListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
36
 
     }
37
 
 
38
 
     TouchAddListener(ti, grab->resource, grab->grabtype,
39
 
-                     type, LISTENER_AWAITING_BEGIN);
40
 
+                     type, LISTENER_AWAITING_BEGIN, grab->window);
41
 
     ti->num_grabs++;
42
 
 }
43
 
 
44
 
@@ -814,7 +816,7 @@ TouchAddRegularListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
45
 
                 TouchEventHistoryAllocate(ti);
46
 
 
47
 
             TouchAddListener(ti, iclients->resource, XI2,
48
 
-                             type, LISTENER_AWAITING_BEGIN);
49
 
+                             type, LISTENER_AWAITING_BEGIN, win);
50
 
             return TRUE;
51
 
         }
52
 
     }
53
 
@@ -830,7 +832,8 @@ TouchAddRegularListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
54
 
 
55
 
             TouchEventHistoryAllocate(ti);
56
 
             TouchAddListener(ti, iclients->resource, XI,
57
 
-                             LISTENER_POINTER_REGULAR, LISTENER_AWAITING_BEGIN);
58
 
+                             LISTENER_POINTER_REGULAR, LISTENER_AWAITING_BEGIN,
59
 
+                             win);
60
 
             return TRUE;
61
 
         }
62
 
     }
63
 
@@ -845,7 +848,8 @@ TouchAddRegularListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
64
 
         {
65
 
             TouchEventHistoryAllocate(ti);
66
 
             TouchAddListener(ti, win->drawable.id, CORE,
67
 
-                             LISTENER_POINTER_REGULAR, LISTENER_AWAITING_BEGIN);
68
 
+                             LISTENER_POINTER_REGULAR, LISTENER_AWAITING_BEGIN,
69
 
+                             win);
70
 
             return TRUE;
71
 
         }
72
 
 
73
 
@@ -857,7 +861,7 @@ TouchAddRegularListener(DeviceIntPtr dev, TouchPointInfoPtr ti,
74
 
 
75
 
             TouchEventHistoryAllocate(ti);
76
 
             TouchAddListener(ti, iclients->resource, CORE,
77
 
-                             type, LISTENER_AWAITING_BEGIN);
78
 
+                             type, LISTENER_AWAITING_BEGIN, win);
79
 
             return TRUE;
80
 
         }
81
 
     }
82
 
diff --git a/include/input.h b/include/input.h
83
 
index fb45617..53645b4 100644
84
 
--- a/include/input.h
85
 
+++ b/include/input.h
86
 
@@ -613,7 +613,8 @@ extern void TouchEventHistoryPush(TouchPointInfoPtr ti, const DeviceEvent *ev);
87
 
 extern void TouchEventHistoryReplay(TouchPointInfoPtr ti, DeviceIntPtr dev, XID resource);
88
 
 extern Bool TouchResourceIsOwner(TouchPointInfoPtr ti, XID resource);
89
 
 extern void TouchAddListener(TouchPointInfoPtr ti, XID resource, enum InputLevel level,
90
 
-                                     enum TouchListenerType type, enum TouchListenerState state);
91
 
+                             enum TouchListenerType type, enum TouchListenerState state,
92
 
+                             WindowPtr window);
93
 
 extern Bool TouchRemoveListener(TouchPointInfoPtr ti, XID resource);
94
 
 extern void TouchSetupListeners(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev);
95
 
 extern Bool TouchEnsureSprite(DeviceIntPtr sourcedev, TouchPointInfoPtr ti,
96
 
diff --git a/include/inputstr.h b/include/inputstr.h
97
 
index c3297db..4e28bc7 100644
98
 
--- a/include/inputstr.h
99
 
+++ b/include/inputstr.h
100
 
@@ -314,6 +314,7 @@ typedef struct _TouchPointInfo {
101
 
         enum TouchListenerType type;
102
 
         enum TouchListenerState state;
103
 
         enum InputLevel level;      /* matters only for emulating touches */
104
 
+        WindowPtr window;
105
 
     } *listeners;
106
 
     int         num_listeners;
107
 
     int         num_grabs;          /* number of open grabs on this touch
108
 
1.7.8.3
109