diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-04-13 11:46:44 +0930 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-04-13 11:46:44 +0930 |
commit | 415c6df0da1197d487456b4c48e2e28e7ded8b8e (patch) | |
tree | e56ca3c24ca6b99aa45984c5f95469be98f07d2e /Xi/exevents.c | |
parent | 961f6660902163e99727c2dcc1a039f32b083859 (diff) |
Xi: copy feedback classes first, in some cases xkb relies on kbdfeed.
XkbInitIndicatorMap (in XkbInitDevice) calls XkbFindSrvLedInfo. This accesses
the devices kbdfeed struct, which is all nice and dandy if it is NULL. When
copying the device classes however, kbdfeed may not be NULL and thus
XkbFindSrvLedInfo goes on its merry way to do whatever it does.
By copying kbdfeed first, we avoid XkbFSLI to reference the "old" kbdfeed
struct of the previous SD.
Diffstat (limited to 'Xi/exevents.c')
-rw-r--r-- | Xi/exevents.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c index 1d4dc51bf..6fa08d133 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -416,6 +416,11 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) _X_EXPORT void DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) { + /* XkbInitDevice (->XkbInitIndicatorMap->XkbFindSrvLedInfo) relies on the + * kbdfeed to be set up properly, so let's do the feedback classes first. + */ + DeepCopyFeedbackClasses(from, to); + #define ALLOC_COPY_CLASS_IF(field, type) \ if (from->field)\ { \ @@ -528,7 +533,6 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to) to->absolute = NULL; } - DeepCopyFeedbackClasses(from, to); } /** |