summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2010-06-09 17:10:57 +1000
committerJulien Cristau <jcristau@debian.org>2010-11-14 00:35:06 +0100
commitc9bca39848add875a76cf2434aabbadb97ddd721 (patch)
treec3c6ae59f2e5b9802e47fff50e1fec95ccc855bf
parent266dc682f623a2aca6654c42164a8d8b9362c53b (diff)
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 5cd11d2356d153840f1b429bdb8284367f8dc468)
-rw-r--r--Xi/extinit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Xi/extinit.c b/Xi/extinit.c
index d0fd2f6a5..daa79f62a 100644
--- a/Xi/extinit.c
+++ b/Xi/extinit.c
@@ -1123,8 +1123,6 @@ RestoreExtensionEvents(void)
static void
IResetProc(ExtensionEntry * unused)
{
- XIResetProperties();
-
ReplySwapVector[IReqCode] = ReplyNotSwappd;
EventSwapVector[DeviceValuator] = NotImplemented;
EventSwapVector[DeviceKeyPress] = NotImplemented;
@@ -1303,6 +1301,8 @@ XInputExtensionInit(void)
inputInfo.all_devices = &xi_all_devices;
inputInfo.all_master_devices = &xi_all_master_devices;
+
+ XIResetProperties();
} else {
FatalError("IExtensionInit: AddExtensions failed\n");
}