[PATCH xserver] kdrive: Only enable threaded input if we have input devices

Keith Packard keithp at keithp.com
Wed Jun 15 00:36:16 UTC 2016


When there aren't any devices, the input thread is going to be pretty
lonely, so don't bother to even start it.

Signed-off-by: Keith Packard <keithp at keithp.com>
---
 hw/kdrive/src/kinput.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c
index 473dc70..2c39624 100644
--- a/hw/kdrive/src/kinput.c
+++ b/hw/kdrive/src/kinput.c
@@ -1305,7 +1305,8 @@ KdInitInput(void)
     KdKeyboardInfo *ki;
     struct KdConfigDevice *dev;
 
-    InputThreadPreInit();
+    if (kdConfigPointers || kdConfigKeyboards)
+        InputThreadPreInit();
 
     kdInputEnabled = TRUE;
 
-- 
2.8.1



More information about the xorg-devel mailing list