Skip to content

Commit

Permalink
Xi: move property reset from extension shutdown to init.
Browse files Browse the repository at this point in the history
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 5cd11d2)
  • Loading branch information
whot authored and jeremyhu committed Dec 2, 2010
1 parent 65f2ab2 commit 2b7588a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Xi/extinit.c
Expand Up @@ -1120,8 +1120,6 @@ RestoreExtensionEvents(void)
static void
IResetProc(ExtensionEntry * unused)
{
XIResetProperties();

ReplySwapVector[IReqCode] = ReplyNotSwappd;
EventSwapVector[DeviceValuator] = NotImplemented;
EventSwapVector[DeviceKeyPress] = NotImplemented;
Expand Down Expand Up @@ -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");
}
Expand Down

0 comments on commit 2b7588a

Please sign in to comment.