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>
This commit is contained in:
parent
001ce71dc1
commit
d33adcdf03
|
@ -257,7 +257,6 @@ int main(int argc, char *argv[], char *envp[])
|
||||||
InitCoreDevices();
|
InitCoreDevices();
|
||||||
InitInput(argc, argv);
|
InitInput(argc, argv);
|
||||||
InitAndStartDevices();
|
InitAndStartDevices();
|
||||||
config_init();
|
|
||||||
|
|
||||||
dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset);
|
dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset);
|
||||||
|
|
||||||
|
@ -305,7 +304,7 @@ int main(int argc, char *argv[], char *envp[])
|
||||||
FreeAllResources();
|
FreeAllResources();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
config_fini();
|
CloseInput();
|
||||||
|
|
||||||
memset(WindowTable, 0, sizeof(WindowTable));
|
memset(WindowTable, 0, sizeof(WindowTable));
|
||||||
CloseDownDevices();
|
CloseDownDevices();
|
||||||
|
|
|
@ -75,6 +75,10 @@ void InitInput(int argc, char **argv)
|
||||||
mieqInit();
|
mieqInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CloseInput(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
/** Called from dix/dispatch.c in Dispatch() whenever input events
|
/** Called from dix/dispatch.c in Dispatch() whenever input events
|
||||||
* require processing. All the work is done in the lower level
|
* require processing. All the work is done in the lower level
|
||||||
* routines. */
|
* routines. */
|
||||||
|
|
|
@ -94,6 +94,11 @@ InitInput (int argc, char **argv)
|
||||||
KdInitInput();
|
KdInitInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CloseInput (void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef DDXBEFORERESET
|
#ifdef DDXBEFORERESET
|
||||||
void
|
void
|
||||||
ddxBeforeReset (void)
|
ddxBeforeReset (void)
|
||||||
|
|
|
@ -58,6 +58,11 @@ InitInput (int argc, char **argv)
|
||||||
KdInitInput ();
|
KdInitInput ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CloseInput (void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef DDXBEFORERESET
|
#ifdef DDXBEFORERESET
|
||||||
void
|
void
|
||||||
ddxBeforeReset (void)
|
ddxBeforeReset (void)
|
||||||
|
|
|
@ -44,6 +44,11 @@ InitInput (int argc, char **argv)
|
||||||
KdInitInput ();
|
KdInitInput ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CloseInput (void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ddxUseMsg (void)
|
ddxUseMsg (void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -142,3 +142,8 @@ InitInput(int argc, char *argv[])
|
||||||
RegisterKeyboardDevice(k);
|
RegisterKeyboardDevice(k);
|
||||||
(void)mieqInit();
|
(void)mieqInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CloseInput (void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
|
@ -90,6 +90,8 @@
|
||||||
#include "Pci.h"
|
#include "Pci.h"
|
||||||
#include "xf86Bus.h"
|
#include "xf86Bus.h"
|
||||||
|
|
||||||
|
#include <hotplug.h>
|
||||||
|
|
||||||
/* forward declarations */
|
/* forward declarations */
|
||||||
static Bool probe_devices_from_device_sections(DriverPtr drvp);
|
static Bool probe_devices_from_device_sections(DriverPtr drvp);
|
||||||
static Bool add_matching_devices_to_configure_list(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)
|
if (xf86NewInputDevice(*pDev, &dev, TRUE) == BadAlloc)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
config_init();
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CloseInput (void)
|
||||||
|
{
|
||||||
|
config_fini();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -109,6 +109,11 @@ InitInput(int argc, char *argv[])
|
||||||
RegisterBlockAndWakeupHandlers(xnestBlockHandler, xnestWakeupHandler, NULL);
|
RegisterBlockAndWakeupHandlers(xnestBlockHandler, xnestWakeupHandler, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CloseInput(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DDX - specific abort routine. Called by AbortServer().
|
* DDX - specific abort routine. Called by AbortServer().
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -171,3 +171,8 @@ InitInput (int argc, char *argv[])
|
||||||
winDebug ("InitInput - returning\n");
|
winDebug ("InitInput - returning\n");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CloseInput (void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
|
@ -420,6 +420,7 @@ extern _X_EXPORT void ProcessInputEvents(void);
|
||||||
extern _X_EXPORT void InitInput(
|
extern _X_EXPORT void InitInput(
|
||||||
int /*argc*/,
|
int /*argc*/,
|
||||||
char ** /*argv*/);
|
char ** /*argv*/);
|
||||||
|
extern _X_EXPORT void CloseInput(void);
|
||||||
|
|
||||||
extern _X_EXPORT int GetMaximumEventsNum(void);
|
extern _X_EXPORT int GetMaximumEventsNum(void);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue