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 65f2ab20b2
commit 2b7588a78f

View file

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