summaryrefslogtreecommitdiff
path: root/x11-drivers/xf86-input-keyboard/files/patch-src__kbd.c
diff options
context:
space:
mode:
Diffstat (limited to 'x11-drivers/xf86-input-keyboard/files/patch-src__kbd.c')
-rw-r--r--x11-drivers/xf86-input-keyboard/files/patch-src__kbd.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/x11-drivers/xf86-input-keyboard/files/patch-src__kbd.c b/x11-drivers/xf86-input-keyboard/files/patch-src__kbd.c
new file mode 100644
index 000000000000..e9b0397baea7
--- /dev/null
+++ b/x11-drivers/xf86-input-keyboard/files/patch-src__kbd.c
@@ -0,0 +1,24 @@
+Index: src/kbd.c
+@@ -25,6 +25,7 @@
+
+ #include "xf86.h"
+ #include "atKeynames.h"
++#include "xf86Priv.h"
+ #include "xf86Privstr.h"
+
+ #include <X11/extensions/XI.h>
+@@ -392,6 +393,14 @@
+ RemoveEnabledDevice(pInfo->fd);
+ pKbd->KbdOff(pInfo, what);
+ device->public.on = FALSE;
++ /*
++ * Close device file for keyboards which are not attached
++ * to console, otherwise they can't be opened again after
++ * relogin when using session manager like xdm.
++ * X server will take care about console attached keyboards.
++ */
++ if (pInfo->fd != xf86Info.consoleFd)
++ close(pInfo->fd);
+ break;
+
+ default: