[PATCH xserver 8/9] xfree86: Use threaded input mechanism
Keith Packard
keithp at keithp.com
Thu Dec 17 16:11:43 PST 2015
Switch the XFree86 DDX over to threaded input
Signed-off-by: Keith Packard <keithp at keithp.com>
---
hw/xfree86/common/xf86Events.c | 4 ++--
hw/xfree86/common/xf86Helper.c | 2 +-
hw/xfree86/common/xf86Init.c | 3 +++
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
index df8c7b6..7191980 100644
--- a/hw/xfree86/common/xf86Events.c
+++ b/hw/xfree86/common/xf86Events.c
@@ -310,7 +310,7 @@ xf86ReadInput(int fd, int ready, void *closure)
void
xf86AddEnabledDevice(InputInfoPtr pInfo)
{
- SetNotifyFd(pInfo->fd, xf86ReadInput, X_NOTIFY_READ, pInfo);
+ InputThreadRegisterDev(pInfo->fd, xf86ReadInput, pInfo);
}
/*
@@ -320,7 +320,7 @@ xf86AddEnabledDevice(InputInfoPtr pInfo)
void
xf86RemoveEnabledDevice(InputInfoPtr pInfo)
{
- RemoveNotifyFd(pInfo->fd);
+ InputThreadUnregisterDev(pInfo->fd);
}
static int *xf86SignalIntercept = NULL;
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index b506338..0aeefd6 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -1729,7 +1729,7 @@ xf86SetSilkenMouse(ScreenPtr pScreen)
* yet. Should handle this differently so that alternate async methods
* work correctly with this too.
*/
- pScrn->silkenMouse = useSM && FALSE;
+ pScrn->silkenMouse = useSM && InputThreadEnable;
if (serverGeneration == 1)
xf86DrvMsg(pScreen->myNum, from, "Silken mouse %s\n",
pScrn->silkenMouse ? "enabled" : "disabled");
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 5281e3e..156f503 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -954,6 +954,9 @@ InitInput(int argc, char **argv)
xf86Info.vtRequestsPending = FALSE;
+ /* Enable threaded input */
+ InputThreadPreInit();
+
mieqInit();
/* Initialize all configured input devices */
--
2.6.4
More information about the xorg-devel
mailing list