From da69f2f15a9917c3ed04e305061683c41338126e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?La=C3=A9rcio=20de=20Sousa?= Date: Fri, 11 Dec 2015 11:43:14 -0200 Subject: [PATCH 04/56] ephyr: don't load ephyr input driver if -seat option is passed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. Reviewed-by: Adam Jackson Signed-off-by: LaƩrcio de Sousa --- 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 9ddf86e..849a4e1 100644 --- a/hw/kdrive/ephyr/ephyrinit.c +++ b/hw/kdrive/ephyr/ephyrinit.c @@ -91,29 +91,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.6.2