opnsense-ports/x11-drivers/xf86-input-keyboard/files/patch-src__kbd.c
Franco Fichtner 8cb1a96ede ports: pull in a snapshot of the FreeBSD ports tree
Taken from:	https://github.com/freebsd/freebsd-ports.git
Commit id:	5070672073b68be364139bc6b3a89100bd17d331
2014-11-09 14:03:21 +01:00

24 lines
618 B
C

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: