summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-09-07 15:04:33 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-09-09 10:31:11 +1000
commitd8aadfa5af85ce6613289efe119e592aa687ab03 (patch)
treeb7289116be8d81a15a42dea9b0285588c974c86d
parente9a507acca01234de189f0f64da63bac32dc13fd (diff)
dix: remove unused and half-broken code to restore original classes.
In theory, the MD should change back to its old, original classes when the last SD is detached. Thanks to the XTEST devices, we'll always have an SD attached until the MD is removed. So let's not worry about that and do nothing instead of having some code that's essentially untested. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--dix/devices.c27
1 files changed, 4 insertions, 23 deletions
diff --git a/dix/devices.c b/dix/devices.c
index 0be3d58ab..97bb7dfe4 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -2374,30 +2374,11 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master)
RecalculateMasterButtons(master);
}
- /* If we were connected to master device before, this MD may need to
- * change back to it's original classes.
+ /* XXX: in theory, the MD should change back to its old, original
+ * classes when the last SD is detached. Thanks to the XTEST devices,
+ * we'll always have an SD attached until the MD is removed.
+ * So let's not worry about that.
*/
- if (oldmaster)
- {
- DeviceIntPtr it;
- for (it = inputInfo.devices; it; it = it->next)
- if (!IsMaster(it) && it->u.master == oldmaster)
- break;
-
- if (!it) /* no dev is paired with old master */
- {
- EventListPtr event = NULL;
-
- /* XXX: reset master back to defaults */
- event = InitEventList(1);
- SetMinimumEventSize(event, 1, sizeof(DeviceChangedEvent));
- CreateClassesChangedEvent(event, oldmaster, oldmaster,
- DEVCHANGE_POINTER_EVENT | DEVCHANGE_KEYBOARD_EVENT);
- XISendDeviceChangedEvent(oldmaster, oldmaster,
- (DeviceChangedEvent*)event->event);
- FreeEventList(event, 1);
- }
- }
return Success;
}