summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/xfree86/os-support/linux/lnx_init.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
index da5ca57cc..6ee8ed6bd 100644
--- a/hw/xfree86/os-support/linux/lnx_init.c
+++ b/hw/xfree86/os-support/linux/lnx_init.c
@@ -376,8 +376,10 @@ xf86CloseConsole()
xf86Msg(X_WARNING, "xf86CloseConsole: KDSETMODE failed: %s\n",
strerror(errno));
- ioctl(xf86Info.consoleFd, KDSKBMODE, tty_mode);
- tcsetattr(xf86Info.consoleFd, TCSANOW, &tty_attr);
+ if (xf86Info.allowEmptyInput) {
+ ioctl(xf86Info.consoleFd, KDSKBMODE, tty_mode);
+ tcsetattr(xf86Info.consoleFd, TCSANOW, &tty_attr);
+ }
if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) < 0)
xf86Msg(X_WARNING, "xf86CloseConsole: VT_GETMODE failed: %s\n",