diff options
Diffstat (limited to 'dix')
-rw-r--r-- | dix/dispatch.c | 12 | ||||
-rw-r--r-- | dix/globals.c | 4 | ||||
-rw-r--r-- | dix/main.c | 11 |
3 files changed, 22 insertions, 5 deletions
diff --git a/dix/dispatch.c b/dix/dispatch.c index 44c24337a..c0e6e589c 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -131,6 +131,7 @@ int ProcInitialConnection(); #include "xkbsrv.h" #include "site.h" #include "client.h" +#include "ddxhooks.h" #ifdef XSERVER_DTRACE #include "registry.h" @@ -225,7 +226,11 @@ UpdateCurrentTimeIf(void) #define SMART_SCHEDULE_DEFAULT_INTERVAL 20 /* ms */ #define SMART_SCHEDULE_MAX_SLICE 200 /* ms */ +#ifdef __CYGWIN__ +Bool SmartScheduleDisable = TRUE; +#else Bool SmartScheduleDisable = FALSE; +#endif long SmartScheduleSlice = SMART_SCHEDULE_DEFAULT_INTERVAL; long SmartScheduleInterval = SMART_SCHEDULE_DEFAULT_INTERVAL; long SmartScheduleMaxSlice = SMART_SCHEDULE_MAX_SLICE; @@ -466,9 +471,10 @@ Dispatch(void) } dispatchException &= ~DE_PRIORITYCHANGE; } -#if defined(DDXBEFORERESET) - ddxBeforeReset (); -#endif + + if (ddxHooks.ddxBeforeReset) + ddxHooks.ddxBeforeReset(); + KillAllClients(); free(clientReady); dispatchException &= ~DE_RESET; diff --git a/dix/globals.c b/dix/globals.c index 0a6b17085..91878430c 100644 --- a/dix/globals.c +++ b/dix/globals.c @@ -60,6 +60,7 @@ SOFTWARE. #include "site.h" #include "dixstruct.h" #include "os.h" +#include "ddxhooks.h" ScreenInfo screenInfo; KeybdCtrl defaultKeyboardControl = { @@ -126,6 +127,9 @@ int defaultColorVisualClass = -1; int monitorResolution = 0; char *display; +int displayfd; char *ConnectionInfo; CARD32 TimeOutValue = DEFAULT_TIMEOUT * MILLI_PER_SECOND; + +DdxHooks ddxHooks; diff --git a/dix/main.c b/dix/main.c index 16575ceba..b5197d9ea 100644 --- a/dix/main.c +++ b/dix/main.c @@ -137,6 +137,10 @@ int main(int argc, char *argv[], char *envp[]) display = "0"; +#ifdef DDXMAIN + ddxMain(); +#endif + InitRegions(); CheckUserParameters(argc, argv, envp); @@ -162,8 +166,7 @@ int main(int argc, char *argv[], char *envp[]) DPMSPowerLevel = 0; #endif InitBlockAndWakeupHandlers(); - /* Perform any operating system dependent initializations you'd like */ - OsInit(); + if(serverGeneration == 1) { CreateWellKnownSockets(); @@ -176,6 +179,10 @@ int main(int argc, char *argv[], char *envp[]) } else ResetWellKnownSockets (); + + /* Perform any operating system dependent initializations you'd like */ + OsInit(); + clients[0] = serverClient; currentMaxClients = 1; |