diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2010-01-15 15:22:02 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2010-02-15 09:15:18 +1000 |
commit | d33adcdf03c69407d151e732fa0cf9947151eb19 (patch) | |
tree | b9df4fcf47d7fcbf80215af4568e2b70ce49ccc6 | |
parent | 001ce71dc11287dc94cc2fbc5d35677c046e6c04 (diff) |
dix: move config_init into the DDX.
The only DDX currently using hotplugging is the xfree86 one and it looks
like it'll stay that way for a bit. Move the initialization to the DDX,
since Xephyr, Xnest, and friends don't need HAL or udev notifications.
Add CloseInput (counterpart to InitInput) to be able to clean up the config
initialization from the DDX as well.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
-rw-r--r-- | dix/main.c | 3 | ||||
-rw-r--r-- | hw/dmx/dmxinput.c | 4 | ||||
-rw-r--r-- | hw/kdrive/ephyr/ephyrinit.c | 5 | ||||
-rw-r--r-- | hw/kdrive/fake/fakeinit.c | 5 | ||||
-rw-r--r-- | hw/kdrive/fbdev/fbinit.c | 5 | ||||
-rw-r--r-- | hw/vfb/InitInput.c | 5 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Init.c | 10 | ||||
-rw-r--r-- | hw/xnest/Init.c | 5 | ||||
-rw-r--r-- | hw/xwin/InitInput.c | 5 | ||||
-rw-r--r-- | include/input.h | 1 |
10 files changed, 46 insertions, 2 deletions
diff --git a/dix/main.c b/dix/main.c index da910fe4b..f0235364f 100644 --- a/dix/main.c +++ b/dix/main.c @@ -257,7 +257,6 @@ int main(int argc, char *argv[], char *envp[]) InitCoreDevices(); InitInput(argc, argv); InitAndStartDevices(); - config_init(); dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset); @@ -305,7 +304,7 @@ int main(int argc, char *argv[], char *envp[]) FreeAllResources(); #endif - config_fini(); + CloseInput(); memset(WindowTable, 0, sizeof(WindowTable)); CloseDownDevices(); diff --git a/hw/dmx/dmxinput.c b/hw/dmx/dmxinput.c index c099349d8..568bb882b 100644 --- a/hw/dmx/dmxinput.c +++ b/hw/dmx/dmxinput.c @@ -75,6 +75,10 @@ void InitInput(int argc, char **argv) mieqInit(); } +void CloseInput(void) +{ +} + /** Called from dix/dispatch.c in Dispatch() whenever input events * require processing. All the work is done in the lower level * routines. */ diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c index c7bfb5bec..27cab3b63 100644 --- a/hw/kdrive/ephyr/ephyrinit.c +++ b/hw/kdrive/ephyr/ephyrinit.c @@ -94,6 +94,11 @@ InitInput (int argc, char **argv) KdInitInput(); } +void +CloseInput (void) +{ +} + #ifdef DDXBEFORERESET void ddxBeforeReset (void) diff --git a/hw/kdrive/fake/fakeinit.c b/hw/kdrive/fake/fakeinit.c index 87c221d37..ba61959ef 100644 --- a/hw/kdrive/fake/fakeinit.c +++ b/hw/kdrive/fake/fakeinit.c @@ -58,6 +58,11 @@ InitInput (int argc, char **argv) KdInitInput (); } +void +CloseInput (void) +{ +} + #ifdef DDXBEFORERESET void ddxBeforeReset (void) diff --git a/hw/kdrive/fbdev/fbinit.c b/hw/kdrive/fbdev/fbinit.c index 93646f6d7..51e7e00d9 100644 --- a/hw/kdrive/fbdev/fbinit.c +++ b/hw/kdrive/fbdev/fbinit.c @@ -45,6 +45,11 @@ InitInput (int argc, char **argv) } void +CloseInput (void) +{ +} + +void ddxUseMsg (void) { KdUseMsg(); diff --git a/hw/vfb/InitInput.c b/hw/vfb/InitInput.c index 7f2d56fa8..35d1dc4d2 100644 --- a/hw/vfb/InitInput.c +++ b/hw/vfb/InitInput.c @@ -142,3 +142,8 @@ InitInput(int argc, char *argv[]) RegisterKeyboardDevice(k); (void)mieqInit(); } + +void +CloseInput (void) +{ +} diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 670744802..2c206ff47 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -90,6 +90,8 @@ #include "Pci.h" #include "xf86Bus.h" +#include <hotplug.h> + /* forward declarations */ static Bool probe_devices_from_device_sections(DriverPtr drvp); static Bool add_matching_devices_to_configure_list(DriverPtr drvp); @@ -1138,6 +1140,14 @@ InitInput(int argc, char **argv) if (xf86NewInputDevice(*pDev, &dev, TRUE) == BadAlloc) break; } + + config_init(); +} + +void +CloseInput (void) +{ + config_fini(); } /* diff --git a/hw/xnest/Init.c b/hw/xnest/Init.c index 0765f73d0..8a90cc65e 100644 --- a/hw/xnest/Init.c +++ b/hw/xnest/Init.c @@ -109,6 +109,11 @@ InitInput(int argc, char *argv[]) RegisterBlockAndWakeupHandlers(xnestBlockHandler, xnestWakeupHandler, NULL); } +void +CloseInput(void) +{ +} + /* * DDX - specific abort routine. Called by AbortServer(). */ diff --git a/hw/xwin/InitInput.c b/hw/xwin/InitInput.c index 1e9bcad7a..705e618de 100644 --- a/hw/xwin/InitInput.c +++ b/hw/xwin/InitInput.c @@ -171,3 +171,8 @@ InitInput (int argc, char *argv[]) winDebug ("InitInput - returning\n"); #endif } + +void +CloseInput (void) +{ +} diff --git a/include/input.h b/include/input.h index 4a845bedf..8561308b3 100644 --- a/include/input.h +++ b/include/input.h @@ -420,6 +420,7 @@ extern _X_EXPORT void ProcessInputEvents(void); extern _X_EXPORT void InitInput( int /*argc*/, char ** /*argv*/); +extern _X_EXPORT void CloseInput(void); extern _X_EXPORT int GetMaximumEventsNum(void); |