input: free the EQ allocated memory on shutdown (#38634)
mieqFini() already does the right thing, but it needs to be called by the various DDXs and the XTest Extension. X.Org Bug 38634 <http://bugs.freedesktop.org/show_bug.cgi?id=38634> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> Acked-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
e084ac30b3
commit
87d4f90bfc
|
@ -679,12 +679,19 @@ GetXTestDevice(DeviceIntPtr master)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
XTestExtensionTearDown(ExtensionEntry *e)
|
||||||
|
{
|
||||||
|
FreeEventList(xtest_evlist, GetMaximumEventsNum());
|
||||||
|
xtest_evlist = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
XTestExtensionInit(INITARGS)
|
XTestExtensionInit(INITARGS)
|
||||||
{
|
{
|
||||||
AddExtension(XTestExtensionName, 0, 0,
|
AddExtension(XTestExtensionName, 0, 0,
|
||||||
ProcXTestDispatch, SProcXTestDispatch,
|
ProcXTestDispatch, SProcXTestDispatch,
|
||||||
NULL, StandardMinorOpcode);
|
XTestExtensionTearDown, StandardMinorOpcode);
|
||||||
|
|
||||||
xtest_evlist = InitEventList(GetMaximumEventsNum());
|
xtest_evlist = InitEventList(GetMaximumEventsNum());
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,6 +77,7 @@ void InitInput(int argc, char **argv)
|
||||||
|
|
||||||
void CloseInput(void)
|
void CloseInput(void)
|
||||||
{
|
{
|
||||||
|
mieqFini();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Called from dix/dispatch.c in Dispatch() whenever input events
|
/** Called from dix/dispatch.c in Dispatch() whenever input events
|
||||||
|
|
|
@ -97,6 +97,7 @@ InitInput (int argc, char **argv)
|
||||||
void
|
void
|
||||||
CloseInput (void)
|
CloseInput (void)
|
||||||
{
|
{
|
||||||
|
KdCloseInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DDXBEFORERESET
|
#ifdef DDXBEFORERESET
|
||||||
|
|
|
@ -61,6 +61,7 @@ InitInput (int argc, char **argv)
|
||||||
void
|
void
|
||||||
CloseInput (void)
|
CloseInput (void)
|
||||||
{
|
{
|
||||||
|
KdCloseInput ();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DDXBEFORERESET
|
#ifdef DDXBEFORERESET
|
||||||
|
|
|
@ -47,6 +47,7 @@ InitInput (int argc, char **argv)
|
||||||
void
|
void
|
||||||
CloseInput (void)
|
CloseInput (void)
|
||||||
{
|
{
|
||||||
|
KdCloseInput ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -500,6 +500,8 @@ KdScreenInfoDispose (KdScreenInfo *si);
|
||||||
/* kinput.c */
|
/* kinput.c */
|
||||||
void
|
void
|
||||||
KdInitInput(void);
|
KdInitInput(void);
|
||||||
|
void
|
||||||
|
KdCloseInput(void);
|
||||||
|
|
||||||
void
|
void
|
||||||
KdAddPointerDriver(KdPointerDriver *);
|
KdAddPointerDriver(KdPointerDriver *);
|
||||||
|
|
|
@ -1305,6 +1305,12 @@ KdInitInput (void)
|
||||||
mieqInit();
|
mieqInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
KdCloseInput (void)
|
||||||
|
{
|
||||||
|
mieqFini();
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Middle button emulation state machine
|
* Middle button emulation state machine
|
||||||
*
|
*
|
||||||
|
|
|
@ -148,4 +148,5 @@ InitInput(int argc, char *argv[])
|
||||||
void
|
void
|
||||||
CloseInput (void)
|
CloseInput (void)
|
||||||
{
|
{
|
||||||
|
mieqFini();
|
||||||
}
|
}
|
||||||
|
|
|
@ -825,6 +825,7 @@ void
|
||||||
CloseInput (void)
|
CloseInput (void)
|
||||||
{
|
{
|
||||||
config_fini();
|
config_fini();
|
||||||
|
mieqFini();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -108,6 +108,7 @@ InitInput(int argc, char *argv[])
|
||||||
void
|
void
|
||||||
CloseInput(void)
|
CloseInput(void)
|
||||||
{
|
{
|
||||||
|
mieqFini();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -505,6 +505,10 @@ void InitInput( int argc, char **argv )
|
||||||
QuartzInitInput(argc, argv);
|
QuartzInitInput(argc, argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CloseInput(void)
|
||||||
|
{
|
||||||
|
DarwinEQFini();
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DarwinAdjustScreenOrigins
|
* DarwinAdjustScreenOrigins
|
||||||
|
|
|
@ -371,6 +371,10 @@ Bool DarwinEQInit(void) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Bool DarwinEQFini(void) {
|
||||||
|
mieqFini();
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ProcessInputEvents
|
* ProcessInputEvents
|
||||||
* Read and process events from the event queue until it is empty.
|
* Read and process events from the event queue until it is empty.
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#define XQUARTZ_VALUATOR_LIMIT (1 << 16)
|
#define XQUARTZ_VALUATOR_LIMIT (1 << 16)
|
||||||
|
|
||||||
Bool DarwinEQInit(void);
|
Bool DarwinEQInit(void);
|
||||||
|
Bool DarwinEQFini(void);
|
||||||
void DarwinEQEnqueue(const xEventPtr e);
|
void DarwinEQEnqueue(const xEventPtr e);
|
||||||
void DarwinEQPointerPost(DeviceIntPtr pDev, xEventPtr e);
|
void DarwinEQPointerPost(DeviceIntPtr pDev, xEventPtr e);
|
||||||
void DarwinEQSwitchScreen(ScreenPtr pScreen, Bool fromDIX);
|
void DarwinEQSwitchScreen(ScreenPtr pScreen, Bool fromDIX);
|
||||||
|
|
|
@ -149,8 +149,3 @@ DeleteInputDeviceRequest(DeviceIntPtr dev)
|
||||||
DEBUG_LOG("DeleteInputDeviceRequest(%p)\n", dev);
|
DEBUG_LOG("DeleteInputDeviceRequest(%p)\n", dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
CloseInput (void)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -156,4 +156,5 @@ InitInput (int argc, char *argv[])
|
||||||
void
|
void
|
||||||
CloseInput (void)
|
CloseInput (void)
|
||||||
{
|
{
|
||||||
|
mieqFini ();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue