xserver: Branch 'master'

Peter Hutterer whot at kemper.freedesktop.org
Thu Dec 18 14:01:50 PST 2008


 hw/xfree86/os-support/linux/lnx_init.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit aea6f19f25e13768b1d09fac4991d6a5e6c2cdac
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Tue Dec 16 17:10:03 2008 +1000

    xfree86: don't restore the TTY mode if we didn't initialize it ourselves
    
    Restoring it unconditionally means we restore to whatever tty_mode has as
    default value (i.e. 0). K_RAW happens to be 0x00, so we always restore to raw
    mode if allowEmptyInput is off.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    Signed-off-by: Adam Jackson <ajax at redhat.com>
    Signed-off-by: Julien Cristau <jcristau at debian.org>

diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
index da5ca57..6ee8ed6 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",


More information about the xorg-commit mailing list