Egbert Eich
7aff496244
- Backport upstream patches for Xephyr input hot-plugging / single-GPU multi-seat support: * U_kdrive-fix-up-NewInputDeviceRequest-implementation.patch * U_kdrive-set-evdev-driver-for-input-devices-automatica.patch * U_ephyr-don-t-load-ephyr-input-driver-if-seat-option-i.patch * U_kdrive-don-t-let-evdev-driver-overwrite-existing-dev.patch * U_ephyr-ignore-Xorg-multiseat-command-line-options.patch * U_ephyr-enable-option-sw-cursor-by-default-in-multi-se.patch * U_kdrive-introduce-input-hot-plugging-support-for-udev.patch * U_kdrive-add-options-to-set-default-XKB-properties.patch * U_kdrive-evdev-update-keyboard-LEDs-22302.patch * U_config-udev-distinguish-between-real-keyboards-and-o.patch OBS-URL: https://build.opensuse.org/request/show/367497 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=616
75 lines
2.3 KiB
Diff
75 lines
2.3 KiB
Diff
From 0b80da0d18713df4712c05973388b6226bb0227f Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?La=C3=A9rcio=20de=20Sousa?=
|
|
<laerciosousa@sme-mogidascruzes.sp.gov.br>
|
|
Date: Fri, 11 Dec 2015 11:43:07 -0200
|
|
Subject: [PATCH 01/56] kdrive: set "evdev" driver for input devices
|
|
automatically, if available.
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
If kdrive input driver "evdev" is available, no other driver was
|
|
explicitly set for a given input device, and its kernel device node is
|
|
/dev/input/event*, this patch will make kdrive set "evdev" driver
|
|
automatically for such device.
|
|
|
|
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
|
Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
|
|
---
|
|
hw/kdrive/src/kinput.c | 25 +++++++++++++++++++++++++
|
|
1 file changed, 25 insertions(+)
|
|
|
|
diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c
|
|
index 980fd3e..3a1c6a0 100644
|
|
--- a/hw/kdrive/src/kinput.c
|
|
+++ b/hw/kdrive/src/kinput.c
|
|
@@ -51,6 +51,11 @@
|
|
#include "inpututils.h"
|
|
#include "optionstr.h"
|
|
|
|
+#ifdef KDRIVE_EVDEV
|
|
+#define DEV_INPUT_EVENT_PREFIX "/dev/input/event"
|
|
+#define DEV_INPUT_EVENT_PREFIX_LEN (sizeof(DEV_INPUT_EVENT_PREFIX) - 1)
|
|
+#endif
|
|
+
|
|
#define AtomFromName(x) MakeAtom(x, strlen(x), 1)
|
|
|
|
struct KdConfigDevice {
|
|
@@ -1097,6 +1102,16 @@ KdParseKbdOptions(KdKeyboardInfo * ki)
|
|
ErrorF("Kbd option key (%s) of value (%s) not assigned!\n",
|
|
key, value);
|
|
}
|
|
+
|
|
+#ifdef KDRIVE_EVDEV
|
|
+ if (!ki->driver && ki->path != NULL &&
|
|
+ strncasecmp(ki->path,
|
|
+ DEV_INPUT_EVENT_PREFIX,
|
|
+ DEV_INPUT_EVENT_PREFIX_LEN) == 0) {
|
|
+ ki->driver = KdFindKeyboardDriver("evdev");
|
|
+ ki->options = input_option_new(ki->options, "driver", "evdev");
|
|
+ }
|
|
+#endif
|
|
}
|
|
|
|
KdKeyboardInfo *
|
|
@@ -1191,6 +1206,16 @@ KdParsePointerOptions(KdPointerInfo * pi)
|
|
ErrorF("Pointer option key (%s) of value (%s) not assigned!\n",
|
|
key, value);
|
|
}
|
|
+
|
|
+#ifdef KDRIVE_EVDEV
|
|
+ if (!pi->driver && pi->path != NULL &&
|
|
+ strncasecmp(pi->path,
|
|
+ DEV_INPUT_EVENT_PREFIX,
|
|
+ DEV_INPUT_EVENT_PREFIX_LEN) == 0) {
|
|
+ pi->driver = KdFindPointerDriver("evdev");
|
|
+ pi->options = input_option_new(pi->options, "driver", "evdev");
|
|
+ }
|
|
+#endif
|
|
}
|
|
|
|
KdPointerInfo *
|
|
--
|
|
2.6.2
|
|
|