diff --git a/hw/dmx/dmxinit.c b/hw/dmx/dmxinit.c index 07154d648..ddb331090 100644 --- a/hw/dmx/dmxinit.c +++ b/hw/dmx/dmxinit.c @@ -838,6 +838,15 @@ ddxGiveUp(enum ExitCode error) AbortDDX(error); } +#if INPUTTHREAD +/** This function is called in Xserver/os/inputthread.c when starting + the input thread. */ +void +ddxInputThreadInit(void) +{ +} +#endif + /** This function is called in Xserver/os/osinit.c from \a OsInit(). */ void OsVendorInit(void) diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c index abc35dfca..47bd97ade 100644 --- a/hw/kdrive/ephyr/ephyrinit.c +++ b/hw/kdrive/ephyr/ephyrinit.c @@ -100,6 +100,15 @@ CloseInput(void) KdCloseInput(); } +#if INPUTTHREAD +/** This function is called in Xserver/os/inputthread.c when starting + the input thread. */ +void +ddxInputThreadInit(void) +{ +} +#endif + #ifdef DDXBEFORERESET void ddxBeforeReset(void) diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c index 407f2afcd..d9f23f360 100644 --- a/hw/vfb/InitOutput.c +++ b/hw/vfb/InitOutput.c @@ -232,6 +232,15 @@ ddxBeforeReset(void) } #endif +#if INPUTTHREAD +/** This function is called in Xserver/os/inputthread.c when starting + the input thread. */ +void +ddxInputThreadInit(void) +{ +} +#endif + void ddxUseMsg(void) { diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index fc60f68d3..0b5724d67 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -1444,3 +1444,12 @@ ddxBeforeReset(void) { } #endif + +#if INPUTTHREAD +/** This function is called in Xserver/os/inputthread.c when starting + the input thread. */ +void +ddxInputThreadInit(void) +{ +} +#endif diff --git a/hw/xnest/Init.c b/hw/xnest/Init.c index b45685216..c3afadf8c 100644 --- a/hw/xnest/Init.c +++ b/hw/xnest/Init.c @@ -169,3 +169,12 @@ ddxBeforeReset(void) return; } #endif + +#if INPUTTHREAD +/** This function is called in Xserver/os/inputthread.c when starting + the input thread. */ +void +ddxInputThreadInit(void) +{ +} +#endif diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c index baa08d87b..324c68ccf 100644 --- a/hw/xwayland/xwayland.c +++ b/hw/xwayland/xwayland.c @@ -72,6 +72,15 @@ ddxBeforeReset(void) { return; } +#endif + +#if INPUTTHREAD +/** This function is called in Xserver/os/inputthread.c when starting + the input thread. */ +void +ddxInputThreadInit(void) +{ +} #endif _X_NORETURN diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c index 9560c5684..1c6fa9fd9 100644 --- a/hw/xwin/InitOutput.c +++ b/hw/xwin/InitOutput.c @@ -151,6 +151,15 @@ ddxBeforeReset(void) } #endif +#if INPUTTHREAD +/** This function is called in Xserver/os/inputthread.c when starting + the input thread. */ +void +ddxInputThreadInit(void) +{ +} +#endif + int main(int argc, char *argv[], char *envp[]) { diff --git a/include/os.h b/include/os.h index 3646194a0..2a1c29ef3 100644 --- a/include/os.h +++ b/include/os.h @@ -556,6 +556,8 @@ extern _X_EXPORT void AbortDDX(enum ExitCode error); extern _X_EXPORT void ddxGiveUp(enum ExitCode error); +extern _X_EXPORT void +ddxInputThreadInit(void); extern _X_EXPORT int TimeSinceLastInputEvent(void); diff --git a/os/inputthread.c b/os/inputthread.c index 97e59d21f..e6694afda 100644 --- a/os/inputthread.c +++ b/os/inputthread.c @@ -318,6 +318,8 @@ InputThreadDoWork(void *arg) sigfillset(&set); pthread_sigmask(SIG_BLOCK, &set, NULL); + ddxInputThreadInit(); + inputThreadInfo->running = TRUE; #if defined(HAVE_PTHREAD_SETNAME_NP_WITH_TID)