aboutsummaryrefslogtreecommitdiffstats
path: root/x11-servers
diff options
context:
space:
mode:
authorlesi <lesi@FreeBSD.org>2004-09-26 22:15:00 +0800
committerlesi <lesi@FreeBSD.org>2004-09-26 22:15:00 +0800
commiteda27333f0ab340328dd365ab33b8563163f49dd (patch)
tree842fdf5653cde7aaa7851807a5b135dbdd05db03 /x11-servers
parent7d57b0315aa24edac253f80b48df93f88bd1b7ff (diff)
downloadfreebsd-ports-gnome-eda27333f0ab340328dd365ab33b8563163f49dd.tar.gz
freebsd-ports-gnome-eda27333f0ab340328dd365ab33b8563163f49dd.tar.zst
freebsd-ports-gnome-eda27333f0ab340328dd365ab33b8563163f49dd.zip
Fix behaviour of keyboard under pc98 where keycodes differ from i386. [1]
Fix behaviour of keyboard under sparc64, where keycodes were off by one (i.e., when pressing 'd' on keyboard, server would get code for 'f'). [2] PR: ports/71937 [1] Submitted by: Satoshi Kimura [1], marius [2] Approved by: portmgr (linimon), mentor (anholt)
Diffstat (limited to 'x11-servers')
-rw-r--r--x11-servers/XFree86-4-Server/Makefile2
-rw-r--r--x11-servers/XFree86-4-Server/files/patch-programs::Xserver::hw::xfree86::common::xf86Events.c73
2 files changed, 74 insertions, 1 deletions
diff --git a/x11-servers/XFree86-4-Server/Makefile b/x11-servers/XFree86-4-Server/Makefile
index 8d9fa733df75..18b27d7de8e1 100644
--- a/x11-servers/XFree86-4-Server/Makefile
+++ b/x11-servers/XFree86-4-Server/Makefile
@@ -7,7 +7,7 @@
PORTNAME= Server
PORTVERSION= 4.4.0
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= x11-servers
MASTER_SITES= ${MASTER_SITE_XFREE:S/$/:x/} \
${MASTER_SITE_LOCAL:S/$/:local/}
diff --git a/x11-servers/XFree86-4-Server/files/patch-programs::Xserver::hw::xfree86::common::xf86Events.c b/x11-servers/XFree86-4-Server/files/patch-programs::Xserver::hw::xfree86::common::xf86Events.c
new file mode 100644
index 000000000000..83fba24a3a2d
--- /dev/null
+++ b/x11-servers/XFree86-4-Server/files/patch-programs::Xserver::hw::xfree86::common::xf86Events.c
@@ -0,0 +1,73 @@
+--- programs/Xserver/hw/xfree86/common/xf86Events.c.orig Tue Sep 21 19:22:14 2004
++++ programs/Xserver/hw/xfree86/common/xf86Events.c Tue Sep 21 19:23:55 2004
+@@ -467,7 +467,7 @@
+ #if defined(SYSCONS_SUPPORT) || defined(PCVT_SUPPORT) || defined(WSCONS_SUPPORT)
+ static Bool first_time = TRUE;
+ #endif
+-#if defined(__sparc__) && defined(__linux__)
++#if defined(__sparc__) && (defined(__linux__) || defined(__FreeBSD__))
+ static int kbdSun = -1;
+ #endif
+ /* Disable any keyboard processing while in suspend */
+@@ -483,7 +483,7 @@
+ }
+ #endif
+
+-#if defined (__sparc__) && defined(__linux__)
++#if defined(__sparc__) && (defined(__linux__) || defined(__FreeBSD__))
+ if (kbdSun == -1) {
+ if ((xf86Info.xkbmodel && !strcmp(xf86Info.xkbmodel, "sun"))
+ || (xf86Info.xkbrules && !strcmp(xf86Info.xkbrules, "sun")))
+@@ -493,7 +493,7 @@
+ }
+ if (kbdSun)
+ goto special;
+-#endif /* __sparc__ && __linux__ */
++#endif /* __sparc__ && (__linux__ || __FreeBSD__) */
+
+ #ifdef __linux__
+ if (xf86Info.kbdCustomKeycodes) {
+@@ -543,7 +543,7 @@
+ }
+ } else
+ #endif /* i386 && SVR4 */
+- {
++ if (!xf86IsPc98()) {
+ switch (scanCode) {
+ case 0x59: scanCode = KEY_0x59; break;
+ case 0x5a: scanCode = KEY_0x5A; break;
+@@ -655,10 +655,12 @@
+ * they need to get the same key code as the base key on the same
+ * physical keyboard key.
+ */
+- if (scanCode == KEY_SysReqest)
+- scanCode = KEY_Print;
+- else if (scanCode == KEY_Break)
+- scanCode = KEY_Pause;
++ if (!xf86IsPc98()) {
++ if (scanCode == KEY_SysReqest)
++ scanCode = KEY_Print;
++ else if (scanCode == KEY_Break)
++ scanCode = KEY_Pause;
++ }
+ #endif
+
+ /*
+@@ -695,7 +697,7 @@
+ }
+ }
+ #endif
+-#if defined (__sparc__) && defined(__linux__)
++#if defined(__sparc__) && (defined(__linux__) || defined(__FreeBSD__))
+ special:
+ if (kbdSun) {
+ switch (scanCode) {
+@@ -729,7 +731,7 @@
+ */
+ scanCode--;
+ }
+-#endif /* defined (__sparc__) && defined(__linux__) */
++#endif /* __sparc__ && (__linux__ || __FreeBSD__) */
+
+ #ifdef XKB
+ if ((xf86Info.ddxSpecialKeys == SKWhenNeeded &&