[PATCH 5/6] dix: accept a NULL master for CreateClassesChangedEvent

Peter Hutterer peter.hutterer at who-t.net
Wed Oct 19 23:25:45 PDT 2011


If a floating device changes, the master is NULL but we must still create a
DCE for it.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 dix/getevents.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dix/getevents.c b/dix/getevents.c
index 8057e62..4845a10 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -218,7 +218,7 @@ CreateClassesChangedEvent(InternalEvent* event,
     dce = &event->changed_event;
     memset(dce, 0, sizeof(DeviceChangedEvent));
     dce->deviceid = slave->id;
-    dce->masterid = master->id;
+    dce->masterid = master ? master->id : 0;
     dce->header = ET_Internal;
     dce->length = sizeof(DeviceChangedEvent);
     dce->type = ET_DeviceChanged;
-- 
1.7.6.4



More information about the xorg-devel mailing list