summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-10-18 17:47:59 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-10-25 14:06:41 +1000
commite9dee21fa3213bfe87b2b728a38eb41d3ba0e664 (patch)
treee5d0347f3a17e954bf6fe4d9736aa8f9c55b3e0e
parentfcdd2587a17437b643b4592aa7f65d11c05a4cd8 (diff)
dix: pass the flags into the CreateClassesChangedEvent
No effective functional changes, prep work for future patches. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
-rw-r--r--dix/getevents.c7
-rw-r--r--include/input.h3
2 files changed, 5 insertions, 5 deletions
diff --git a/dix/getevents.c b/dix/getevents.c
index 31c69bf0b..8057e6296 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -209,7 +209,7 @@ void
CreateClassesChangedEvent(InternalEvent* event,
DeviceIntPtr master,
DeviceIntPtr slave,
- int type)
+ int flags)
{
int i;
DeviceChangedEvent *dce;
@@ -223,8 +223,7 @@ CreateClassesChangedEvent(InternalEvent* event,
dce->length = sizeof(DeviceChangedEvent);
dce->type = ET_DeviceChanged;
dce->time = ms;
- dce->flags = type;
- dce->flags |= DEVCHANGE_SLAVE_SWITCH;
+ dce->flags = flags;
dce->sourceid = slave->id;
if (slave->button)
@@ -674,7 +673,7 @@ UpdateFromMaster(InternalEvent* events, DeviceIntPtr dev, int type, int *num_eve
if (master && master->last.slave != dev)
{
- CreateClassesChangedEvent(events, master, dev, type);
+ CreateClassesChangedEvent(events, master, dev, type | DEVCHANGE_SLAVE_SWITCH);
if (IsPointerDevice(master))
{
updateSlaveDeviceCoords(master, dev);
diff --git a/include/input.h b/include/input.h
index a1930bb66..4eee47ce4 100644
--- a/include/input.h
+++ b/include/input.h
@@ -427,7 +427,8 @@ extern _X_EXPORT void FreeEventList(InternalEvent *list, int num_events);
extern void CreateClassesChangedEvent(InternalEvent *event,
DeviceIntPtr master,
DeviceIntPtr slave,
- int type);
+ int flags);
+
extern InternalEvent * UpdateFromMaster(
InternalEvent *events,
DeviceIntPtr pDev,