[PATCH kdrive/ephyr v7 9/9] ephyr: don't load ephyr input driver if -seat option is passed

Laércio de Sousa laerciosousa at sme-mogidascruzes.sp.gov.br
Fri Dec 11 05:43:14 PST 2015


When used for single-GPU multi-seat purposes, there's no need to
enable ephyr virtual input devices, since Xephyr is supposed to
handle its own hardware devices.

Signed-off-by: Laércio de Sousa <laerciosousa at sme-mogidascruzes.sp.gov.br>
---
 hw/kdrive/ephyr/ephyrinit.c | 35 ++++++++++++++++++-----------------
 1 file changed, 18 insertions(+), 17 deletions(-)

diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c
index 09ada96..da43382 100644
--- a/hw/kdrive/ephyr/ephyrinit.c
+++ b/hw/kdrive/ephyr/ephyrinit.c
@@ -94,29 +94,30 @@ InitInput(int argc, char **argv)
     KdKeyboardInfo *ki;
     KdPointerInfo *pi;
 
-    KdAddKeyboardDriver(&EphyrKeyboardDriver);
 #ifdef KDRIVE_EVDEV
     KdAddKeyboardDriver(&LinuxEvdevKeyboardDriver);
-#endif
-    KdAddPointerDriver(&EphyrMouseDriver);
-#ifdef KDRIVE_EVDEV
     KdAddPointerDriver(&LinuxEvdevMouseDriver);
 #endif
 
-    if (!kdHasKbd) {
-        ki = KdNewKeyboard();
-        if (!ki)
-            FatalError("Couldn't create Xephyr keyboard\n");
-        ki->driver = &EphyrKeyboardDriver;
-        KdAddKeyboard(ki);
-    }
+    if (!SeatId) {
+        KdAddKeyboardDriver(&EphyrKeyboardDriver);
+        KdAddPointerDriver(&EphyrMouseDriver);
 
-    if (!kdHasPointer) {
-        pi = KdNewPointer();
-        if (!pi)
-            FatalError("Couldn't create Xephyr pointer\n");
-        pi->driver = &EphyrMouseDriver;
-        KdAddPointer(pi);
+        if (!kdHasKbd) {
+            ki = KdNewKeyboard();
+            if (!ki)
+                FatalError("Couldn't create Xephyr keyboard\n");
+            ki->driver = &EphyrKeyboardDriver;
+            KdAddKeyboard(ki);
+        }
+
+        if (!kdHasPointer) {
+            pi = KdNewPointer();
+            if (!pi)
+                FatalError("Couldn't create Xephyr pointer\n");
+            pi->driver = &EphyrMouseDriver;
+            KdAddPointer(pi);
+        }
     }
 
     KdInitInput();
-- 
2.1.4



More information about the xorg-devel mailing list