From ac556019cfcaaf9b5367a56f6e52ee51a95f453c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 9 Jun 2010 17:10:57 +1000 Subject: [PATCH] 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 Reviewed-by: Julien Cristau (cherry picked from commit 5cd11d2356d153840f1b429bdb8284367f8dc468) --- Xi/extinit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Xi/extinit.c b/Xi/extinit.c index 37f985664..72df3c104 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -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"); }