summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-12-21 11:11:48 +1000
committerChase Douglas <chase.douglas@canonical.com>2011-12-21 10:34:12 -0800
commit9e58eb6cffad57a48817f918014bef29f9202633 (patch)
tree4f8e26d69533f203670ce09856d18fab8ac8b29d
parent7b97a1954c97f5cf13e3610c980c5fd3f8433703 (diff)
dix: remove requirement for client_id be the first element
Leftover code from an earlier version of GetTouchEvents. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
-rw-r--r--dix/getevents.c7
-rw-r--r--include/inputstr.h2
2 files changed, 5 insertions, 4 deletions
diff --git a/dix/getevents.c b/dix/getevents.c
index b60ddc006..3b40a5bb7 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -1738,6 +1738,7 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
} touchpoint;
int need_rawevent = TRUE;
Bool emulate_pointer = FALSE;
+ int client_id = 0;
if (!dev->enabled || !t || !v)
return 0;
@@ -1761,6 +1762,7 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
}
need_rawevent = FALSE;
+ client_id = touchpoint.dix_ti->client_id;
} else /* a DDX-submitted touch */
{
touchpoint.ti = TouchFindByDDXID(dev, ddx_touchid, (type == XI_TouchBegin));
@@ -1770,6 +1772,7 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
type == XI_TouchBegin ? "begin" : "find", ddx_touchid);
return 0;
}
+ client_id = touchpoint.ti->client_id;
}
if (!(flags & TOUCH_CLIENT_ID))
@@ -1787,7 +1790,7 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
raw = &events->raw_event;
events++;
num_events++;
- init_raw(dev, raw, ms, type, touchpoint.ti->client_id);
+ init_raw(dev, raw, ms, type, client_id);
set_raw_valuators(raw, &mask, raw->valuators.data_raw);
}
@@ -1877,7 +1880,7 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
event->root = scr->root->drawable.id;
event_set_root_coordinates(event, screenx, screeny);
- event->touchid = touchpoint.ti->client_id;
+ event->touchid = client_id;
event->flags = flags;
if (emulate_pointer)
diff --git a/include/inputstr.h b/include/inputstr.h
index 9881c7e46..518e2f4f7 100644
--- a/include/inputstr.h
+++ b/include/inputstr.h
@@ -301,7 +301,6 @@ typedef struct _ValuatorClassRec {
} ValuatorClassRec;
typedef struct _TouchPointInfo {
- /* client_id must be first element, see GetTouchEvents */
uint32_t client_id; /* touch ID as seen in client events */
int sourceid; /* Source device's ID for this touchpoint */
Bool active; /* whether or not the touch is active */
@@ -328,7 +327,6 @@ typedef struct _TouchPointInfo {
typedef struct _TouchListener TouchListener;
typedef struct _DDXTouchPointInfo {
- /* client_id must be first element, see GetTouchEvents */
uint32_t client_id; /* touch ID as seen in client events */
Bool active; /* whether or not the touch is active */
uint32_t ddx_id; /* touch ID given by the DDX */