[PATCH 3/6] dix: pass the flags into the CreateClassesChangedEvent
Peter Hutterer
peter.hutterer at who-t.net
Wed Oct 19 23:25:43 PDT 2011
No effective functional changes, prep work for future patches.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
dix/getevents.c | 7 +++----
include/input.h | 3 ++-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dix/getevents.c b/dix/getevents.c
index 31c69bf..8057e62 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 a1930bb..4eee47c 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,
--
1.7.6.4
More information about the xorg-devel
mailing list