From b3e1e62c45f525cdd332073aaa34d8452cb23374 Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 19 Nov 2012 10:47:23 +0100 Subject: git update 19 nov 2012 fontconfig: c20ac78b01df3f0919352bba16b5b48b3b5d4d6d libxcb: 76a2166de9c80b35f987fdc3f3a228bafa0de94e mesa: ddb901fbf4489ffcd85d3320f23913eb1d4fbdfe pixman: 44dd746bb68625b2f6be77c3f80292b45defe9d7 xserver: 6a6c3afe71ac82a93d9fd0034dd5bbdcf0eae1ea xkeyboard-config: 709e05c069428236ca2567e784c9971eecc8ca50 --- xorg-server/hw/xfree86/os-support/linux/lnx_init.c | 33 +++++++++++++++------- 1 file changed, 23 insertions(+), 10 deletions(-) (limited to 'xorg-server/hw/xfree86/os-support') diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_init.c b/xorg-server/hw/xfree86/os-support/linux/lnx_init.c index 68c296b0f..bcb039f3f 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_init.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_init.c @@ -38,6 +38,14 @@ #include +#ifndef K_OFF +#define K_OFF 0x4 +#endif + +#ifndef KDSKBMUTE +#define KDSKBMUTE 0x4B51 +#endif + static Bool KeepTty = FALSE; static int activeVT = -1; @@ -213,19 +221,23 @@ xf86OpenConsole(void) tcgetattr(xf86Info.consoleFd, &tty_attr); SYSCALL(ioctl(xf86Info.consoleFd, KDGKBMODE, &tty_mode)); -#ifdef K_OFF - /* disable kernel special keys and buffering */ - SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSKBMODE, K_OFF)); + /* disable kernel special keys and buffering, new style */ + SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSKBMUTE, 1)); if (ret < 0) -#endif { - SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSKBMODE, K_RAW)); + /* disable kernel special keys and buffering, old style */ + SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSKBMODE, K_OFF)); if (ret < 0) - FatalError("xf86OpenConsole: KDSKBMODE K_RAW failed %s\n", - strerror(errno)); - - /* need to keep the buffer clean, else the kernel gets angry */ - xf86SetConsoleHandler(drain_console, NULL); + { + /* fine, just disable special keys */ + SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSKBMODE, K_RAW)); + if (ret < 0) + FatalError("xf86OpenConsole: KDSKBMODE K_RAW failed %s\n", + strerror(errno)); + + /* ... and drain events, else the kernel gets angry */ + xf86SetConsoleHandler(drain_console, NULL); + } } nTty = tty_attr; @@ -271,6 +283,7 @@ xf86CloseConsole(void) xf86Msg(X_WARNING, "xf86CloseConsole: KDSETMODE failed: %s\n", strerror(errno)); + SYSCALL(ioctl(xf86Info.consoleFd, KDSKBMUTE, 0)); SYSCALL(ioctl(xf86Info.consoleFd, KDSKBMODE, tty_mode)); tcsetattr(xf86Info.consoleFd, TCSANOW, &tty_attr); -- cgit v1.2.3