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.
This commit is contained in:
parent
961f666090
commit
415c6df0da
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user