Xi: move property reset from extension shutdown to init.

If any part of the stack calls XIGetKnownProperty during device shutdown
the property is re-initialized before the server generation resets, leaving
the value invalid again.

Move the reset to the extension init which happens before input devices are
initialized before the first property is requested.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
This commit is contained in:
Peter Hutterer 2010-06-09 17:10:57 +10:00
parent da66119593
commit 5cd11d2356
1 changed files with 2 additions and 2 deletions

View File

@ -1120,8 +1120,6 @@ RestoreExtensionEvents(void)
static void
IResetProc(ExtensionEntry * unused)
{
XIResetProperties();
ReplySwapVector[IReqCode] = ReplyNotSwappd;
EventSwapVector[DeviceValuator] = NotImplemented;
EventSwapVector[DeviceKeyPress] = NotImplemented;
@ -1301,6 +1299,8 @@ XInputExtensionInit(void)
inputInfo.all_devices = &xi_all_devices;
inputInfo.all_master_devices = &xi_all_master_devices;
XIResetProperties();
} else {
FatalError("IExtensionInit: AddExtensions failed\n");
}