Changeset View
Changeset View
Standalone View
Standalone View
x11-servers/xorg-server/files/patch-config_udev.c
Property | Old Value | New Value |
---|---|---|
fbsd:nokeywords | null | yes \ No newline at end of property |
svn:eol-style | null | native \ No newline at end of property |
svn:mime-type | null | text/plain \ No newline at end of property |
--- config/udev.c.orig 2015-05-21 17:23:54.000000000 +0300 | |||||
+++ config/udev.c 2015-10-13 17:37:05.063290000 +0300 | |||||
@@ -29,6 +29,7 @@ | |||||
#include <libudev.h> | |||||
#include <ctype.h> | |||||
+#include <fcntl.h> | |||||
#include <unistd.h> | |||||
#include "input.h" | |||||
@@ -188,6 +189,20 @@ device_added(struct udev_device *udev_de | |||||
attrs.product = strdup(name); | |||||
input_options = input_option_new(input_options, "name", name); | |||||
input_options = input_option_new(input_options, "path", path); | |||||
+ if(strstr(path, "kbdmux") != NULL) { | |||||
+ /* | |||||
+ * Don't pass "device" option if the keyboard is already attached | |||||
+ * to the console (ie. open() fails). This would activate a special | |||||
+ * logic in xf86-input-keyboard. Prevent any other attached to console | |||||
+ * keyboards being processed. There can be only one such device. | |||||
+ */ | |||||
+ int fd = open(path, O_RDONLY); | |||||
+ if (fd > -1) { | |||||
+ close(fd); | |||||
+ input_options = input_option_new(input_options, "device", path); | |||||
+ } | |||||
+ } | |||||
+ else | |||||
input_options = input_option_new(input_options, "device", path); | |||||
input_options = input_option_new(input_options, "major", itoa(major(devnum))); | |||||
input_options = input_option_new(input_options, "minor", itoa(minor(devnum))); |