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>
(cherry picked from commit 5cd11d2356)
This commit is contained in:
Peter Hutterer 2010-06-09 17:10:57 +10:00 committed by Jeremy Huddleston
parent 4f7b19a40d
commit ac556019cf

View File

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