diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-06-27 09:10:42 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-07-01 08:46:28 +1000 |
commit | 87d4f90bfcb509471ac9e7886e14a92b33223fd7 (patch) | |
tree | c211c23e866f53f6862d7e468bf3df07229083d7 | |
parent | e084ac30b37c36016bb0dbb1b79e60a7799aee02 (diff) |
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>
-rw-r--r-- | Xext/xtest.c | 9 | ||||
-rw-r--r-- | hw/dmx/dmxinput.c | 1 | ||||
-rw-r--r-- | hw/kdrive/ephyr/ephyrinit.c | 1 | ||||
-rw-r--r-- | hw/kdrive/fake/fakeinit.c | 1 | ||||
-rw-r--r-- | hw/kdrive/fbdev/fbinit.c | 1 | ||||
-rw-r--r-- | hw/kdrive/src/kdrive.h | 2 | ||||
-rw-r--r-- | hw/kdrive/src/kinput.c | 6 | ||||
-rw-r--r-- | hw/vfb/InitInput.c | 1 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Init.c | 1 | ||||
-rw-r--r-- | hw/xnest/Init.c | 1 | ||||
-rw-r--r-- | hw/xquartz/darwin.c | 4 | ||||
-rw-r--r-- | hw/xquartz/darwinEvents.c | 4 | ||||
-rw-r--r-- | hw/xquartz/darwinEvents.h | 1 | ||||
-rw-r--r-- | hw/xquartz/darwinXinput.c | 5 | ||||
-rw-r--r-- | hw/xwin/InitInput.c | 1 |
15 files changed, 33 insertions, 6 deletions
diff --git a/Xext/xtest.c b/Xext/xtest.c index daa6430f1..cc675c116 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -679,12 +679,19 @@ GetXTestDevice(DeviceIntPtr master) return NULL; } +static void +XTestExtensionTearDown(ExtensionEntry *e) +{ + FreeEventList(xtest_evlist, GetMaximumEventsNum()); + xtest_evlist = NULL; +} + void XTestExtensionInit(INITARGS) { AddExtension(XTestExtensionName, 0, 0, ProcXTestDispatch, SProcXTestDispatch, - NULL, StandardMinorOpcode); + XTestExtensionTearDown, StandardMinorOpcode); xtest_evlist = InitEventList(GetMaximumEventsNum()); } diff --git a/hw/dmx/dmxinput.c b/hw/dmx/dmxinput.c index 568bb882b..f006af4d2 100644 --- a/hw/dmx/dmxinput.c +++ b/hw/dmx/dmxinput.c @@ -77,6 +77,7 @@ void InitInput(int argc, char **argv) void CloseInput(void) { + mieqFini(); } /** Called from dix/dispatch.c in Dispatch() whenever input events diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c index 7d4cadb9f..b674bb8d0 100644 --- a/hw/kdrive/ephyr/ephyrinit.c +++ b/hw/kdrive/ephyr/ephyrinit.c @@ -97,6 +97,7 @@ InitInput (int argc, char **argv) void CloseInput (void) { + KdCloseInput(); } #ifdef DDXBEFORERESET diff --git a/hw/kdrive/fake/fakeinit.c b/hw/kdrive/fake/fakeinit.c index ba61959ef..e25093fbf 100644 --- a/hw/kdrive/fake/fakeinit.c +++ b/hw/kdrive/fake/fakeinit.c @@ -61,6 +61,7 @@ InitInput (int argc, char **argv) void CloseInput (void) { + KdCloseInput (); } #ifdef DDXBEFORERESET diff --git a/hw/kdrive/fbdev/fbinit.c b/hw/kdrive/fbdev/fbinit.c index 3b55ab162..1d66fce32 100644 --- a/hw/kdrive/fbdev/fbinit.c +++ b/hw/kdrive/fbdev/fbinit.c @@ -47,6 +47,7 @@ InitInput (int argc, char **argv) void CloseInput (void) { + KdCloseInput (); } void diff --git a/hw/kdrive/src/kdrive.h b/hw/kdrive/src/kdrive.h index 847d89b48..9ac5a19d7 100644 --- a/hw/kdrive/src/kdrive.h +++ b/hw/kdrive/src/kdrive.h @@ -500,6 +500,8 @@ KdScreenInfoDispose (KdScreenInfo *si); /* kinput.c */ void KdInitInput(void); +void +KdCloseInput(void); void KdAddPointerDriver(KdPointerDriver *); diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c index 7fa4a8f8a..c14dd8241 100644 --- a/hw/kdrive/src/kinput.c +++ b/hw/kdrive/src/kinput.c @@ -1305,6 +1305,12 @@ KdInitInput (void) mieqInit(); } +void +KdCloseInput (void) +{ + mieqFini(); +} + /* * Middle button emulation state machine * diff --git a/hw/vfb/InitInput.c b/hw/vfb/InitInput.c index 60b59c164..8836bbd7f 100644 --- a/hw/vfb/InitInput.c +++ b/hw/vfb/InitInput.c @@ -148,4 +148,5 @@ InitInput(int argc, char *argv[]) void CloseInput (void) { + mieqFini(); } diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 53f763aaf..15fdbc349 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -825,6 +825,7 @@ void CloseInput (void) { config_fini(); + mieqFini(); } /* diff --git a/hw/xnest/Init.c b/hw/xnest/Init.c index ee74101d2..ea0669a6a 100644 --- a/hw/xnest/Init.c +++ b/hw/xnest/Init.c @@ -108,6 +108,7 @@ InitInput(int argc, char *argv[]) void CloseInput(void) { + mieqFini(); } /* diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c index 29ab83677..73685b0d4 100644 --- a/hw/xquartz/darwin.c +++ b/hw/xquartz/darwin.c @@ -505,6 +505,10 @@ void InitInput( int argc, char **argv ) QuartzInitInput(argc, argv); } +void CloseInput(void) +{ + DarwinEQFini(); +} /* * DarwinAdjustScreenOrigins diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c index fe744b741..1f22099d6 100644 --- a/hw/xquartz/darwinEvents.c +++ b/hw/xquartz/darwinEvents.c @@ -371,6 +371,10 @@ Bool DarwinEQInit(void) { return TRUE; } +Bool DarwinEQFini(void) { + mieqFini(); +} + /* * ProcessInputEvents * Read and process events from the event queue until it is empty. diff --git a/hw/xquartz/darwinEvents.h b/hw/xquartz/darwinEvents.h index 6769c8bd8..bd29d51fd 100644 --- a/hw/xquartz/darwinEvents.h +++ b/hw/xquartz/darwinEvents.h @@ -32,6 +32,7 @@ #define XQUARTZ_VALUATOR_LIMIT (1 << 16) Bool DarwinEQInit(void); +Bool DarwinEQFini(void); void DarwinEQEnqueue(const xEventPtr e); void DarwinEQPointerPost(DeviceIntPtr pDev, xEventPtr e); void DarwinEQSwitchScreen(ScreenPtr pScreen, Bool fromDIX); diff --git a/hw/xquartz/darwinXinput.c b/hw/xquartz/darwinXinput.c index 3ef34fec0..94c31bb23 100644 --- a/hw/xquartz/darwinXinput.c +++ b/hw/xquartz/darwinXinput.c @@ -149,8 +149,3 @@ DeleteInputDeviceRequest(DeviceIntPtr dev) DEBUG_LOG("DeleteInputDeviceRequest(%p)\n", dev); } -void -CloseInput (void) -{ -} - diff --git a/hw/xwin/InitInput.c b/hw/xwin/InitInput.c index 70578b16c..bc48a9360 100644 --- a/hw/xwin/InitInput.c +++ b/hw/xwin/InitInput.c @@ -156,4 +156,5 @@ InitInput (int argc, char *argv[]) void CloseInput (void) { + mieqFini (); } |