xfree86: Use threaded input mechanism [v2]

Switch the XFree86 DDX over to threaded input

v2: Rewrite comment in xf86Helper about silken mouse

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Keith Packard 2015-12-08 14:53:08 -08:00
parent f84703b50c
commit a977c9c4d0
3 changed files with 7 additions and 10 deletions

View File

@ -310,7 +310,7 @@ xf86ReadInput(int fd, int ready, void *closure)
void void
xf86AddEnabledDevice(InputInfoPtr pInfo) xf86AddEnabledDevice(InputInfoPtr pInfo)
{ {
SetNotifyFd(pInfo->fd, xf86ReadInput, X_NOTIFY_READ, pInfo); InputThreadRegisterDev(pInfo->fd, xf86ReadInput, pInfo);
} }
/* /*
@ -320,7 +320,7 @@ xf86AddEnabledDevice(InputInfoPtr pInfo)
void void
xf86RemoveEnabledDevice(InputInfoPtr pInfo) xf86RemoveEnabledDevice(InputInfoPtr pInfo)
{ {
RemoveNotifyFd(pInfo->fd); InputThreadUnregisterDev(pInfo->fd);
} }
static int *xf86SignalIntercept = NULL; static int *xf86SignalIntercept = NULL;

View File

@ -1719,15 +1719,9 @@ xf86SetSilkenMouse(ScreenPtr pScreen)
} }
free(options); free(options);
/* /*
* XXX quick hack to report correctly for OSs that can't do SilkenMouse * Use silken mouse if requested and if we have threaded input
* yet. Should handle this differently so that alternate async methods
* work correctly with this too.
*/ */
/* Disable this completely when removing SIGIO support. It pScrn->silkenMouse = useSM && InputThreadEnable;
* will get re-enabled correctly when we add threaded input
* support
*/
pScrn->silkenMouse = useSM && FALSE;
if (serverGeneration == 1) if (serverGeneration == 1)
xf86DrvMsg(pScreen->myNum, from, "Silken mouse %s\n", xf86DrvMsg(pScreen->myNum, from, "Silken mouse %s\n",
pScrn->silkenMouse ? "enabled" : "disabled"); pScrn->silkenMouse ? "enabled" : "disabled");

View File

@ -887,6 +887,9 @@ InitInput(int argc, char **argv)
xf86Info.vtRequestsPending = FALSE; xf86Info.vtRequestsPending = FALSE;
/* Enable threaded input */
InputThreadPreInit();
mieqInit(); mieqInit();
/* Initialize all configured input devices */ /* Initialize all configured input devices */