ChangeLog | 247 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ configure.ac | 4 debian/changelog | 6 + src/bsd_KbdMap.c | 200 -------------------------------------------- src/bsd_kbd.c | 53 ++--------- src/hurd_kbd.c | 9 -- src/kbd.c | 174 ++++++++++++++------------------------ src/lnx_KbdMap.c | 4 src/lnx_kbd.c | 9 -- src/sun_kbd.c | 41 ++------- src/sun_kbdMap.c | 12 -- src/xf86Keymap.h | 139 ------------------------------ src/xf86OSKbd.h | 26 ----- 13 files changed, 342 insertions(+), 582 deletions(-)
New commits: commit 46ad498c6e6998cc492e4fce5d1124b459e7a670 Author: Cyril Brulebois <[email protected]> Date: Mon Feb 21 02:30:02 2011 +0100 Upload to unstable. diff --git a/debian/changelog b/debian/changelog index 241bac8..6c43948 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -xserver-xorg-input-keyboard (1:1.5.99.901-1) UNRELEASED; urgency=low +xserver-xorg-input-keyboard (1:1.5.99.901-1) unstable; urgency=low * New upstream release. - -- Cyril Brulebois <[email protected]> Mon, 21 Feb 2011 02:28:26 +0100 + -- Cyril Brulebois <[email protected]> Mon, 21 Feb 2011 02:29:57 +0100 xserver-xorg-input-keyboard (1:1.5.0-2) unstable; urgency=low commit ef018ad8637c0c8ca54aa6880a2df46b8de68f5d Author: Cyril Brulebois <[email protected]> Date: Mon Feb 21 02:28:36 2011 +0100 Bump changelogs. diff --git a/ChangeLog b/ChangeLog index 170dc0a..c032f43 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,250 @@ +commit 6496bb21074faff2642e09389b5476225dc4fdb3 +Author: Peter Hutterer <[email protected]> +Date: Mon Feb 21 09:59:14 2011 +1000 + + keyboard 1.5.99.901 + + Signed-off-by: Peter Hutterer <[email protected]> + +commit 15f0a4b71b4580c7dd9a0abd7b8fb92756b6733a +Author: Alexandr Shadchin <[email protected]> +Date: Thu Feb 17 15:40:29 2011 +0500 + + Removed unnecessary code, since ABI_XINPUT_VERSION >= 2 + + Signed-off-by: Alexandr Shadchin <[email protected]> + Signed-off-by: Peter Hutterer <[email protected]> + +commit de7a5c120f646e293cc216007a5df865b41833b8 +Author: Alexandr Shadchin <[email protected]> +Date: Thu Feb 17 15:40:28 2011 +0500 + + Require server 1.4 or later + + Signed-off-by: Alexandr Shadchin <[email protected]> + Signed-off-by: Peter Hutterer <[email protected]> + +commit a02757d7c3d8018f44c63553578763fcef41bcca +Author: Alexandr Shadchin <[email protected]> +Date: Wed Feb 16 13:21:03 2011 +0500 + + Cleanup set the value of CustomKeycodes + + Also, do not print values of variables CustomKeycodes twice. + + Signed-off-by: Alexandr Shadchin <[email protected]> + Signed-off-by: Peter Hutterer <[email protected]> + +commit f45f3dbcf1f2a54d7d6a51d6e9884820cff4be12 +Author: Alexandr Shadchin <[email protected]> +Date: Fri Feb 11 15:33:00 2011 +0500 + + Do not print values of Protocol twice + + Protocol printed when found in xf86SetStrOption(). + + Signed-off-by: Alexandr Shadchin <[email protected]> + Signed-off-by: Peter Hutterer <[email protected]> + +commit 6fca7f2371c113796d4cf27cca5635f3c6fb30af +Author: Alexandr Shadchin <[email protected]> +Date: Fri Feb 11 15:32:59 2011 +0500 + + Remove unused XQUEUE + + Signed-off-by: Alexandr Shadchin <[email protected]> + Signed-off-by: Peter Hutterer <[email protected]> + +commit 8a540fa439bd7ea30c49d43ff3339ab599a7ba14 +Author: Alexandr Shadchin <[email protected]> +Date: Fri Feb 11 15:32:57 2011 +0500 + + lnx: Fix detect CustomKeycodes for __powerpc__ + + Signed-off-by: Alexandr Shadchin <[email protected]> + Signed-off-by: Peter Hutterer <[email protected]> + +commit 849f5092efd770cf169ce9950e9dbb0bccbf9017 +Author: Alexandr Shadchin <[email protected]> +Date: Sat Jan 8 17:09:10 2011 +0500 + + Removing unused bell_pitch and bell_duration + + Signed-off-by: Alexandr Shadchin <[email protected]> + Signed-off-by: Peter Hutterer <[email protected]> + +commit dd9ed7921ccffff9cacb6dc128b3f426f9312535 +Author: Alexandr Shadchin <[email protected]> +Date: Sat Jan 8 20:09:48 2011 +0500 + + Removing unused PROT_XQUEUE and PROT_USB + + Signed-off-by: Alexandr Shadchin <[email protected]> + Signed-off-by: Peter Hutterer <[email protected]> + +commit 78652023a9f7758635e5507255826d79fbb2b028 +Author: Alexandr Shadchin <[email protected]> +Date: Sat Jan 8 17:09:38 2011 +0500 + + bsd: Replace deprecated xfree/xcalloc with free & calloc + + Signed-off-by: Alexandr Shadchin <[email protected]> + Signed-off-by: Peter Hutterer <[email protected]> + +commit f7a81ab4225e14a50e26a49a0a17a2cf773a4ab1 +Author: Alexandr Shadchin <[email protected]> +Date: Sat Jan 8 17:08:41 2011 +0500 + + Remove random History comment and OS_KBD_VERSION_CURRENT + + In xf86-input-mouse similar cleanup already done, can also make for keyboard? + + Signed-off-by: Alexandr Shadchin <[email protected]> + Signed-off-by: Peter Hutterer <[email protected]> + +commit e2f6e5d976ff8bbe68dc41b51d983cc95c11db84 +Author: Alexandr Shadchin <[email protected]> +Date: Thu Jan 6 14:43:13 2011 +0500 + + Do not print values of variables XkbRules etc. twice + + xf86SetStrOption prints in log value of the variables XkbRules etc., + there is no need to take this information twice. + + Signed-off-by: Alexandr Shadchin <[email protected]> + Signed-off-by: Alan Coopersmith <[email protected]> + +commit 7d03efb3a3af77ca6831492a793d18b89cc64083 +Author: Alexandr Shadchin <[email protected]> +Date: Thu Jan 6 13:37:39 2011 +0500 + + bsd: Fix print wscons type keyboard for Sun5 + + Signed-off-by: Alexandr Shadchin <[email protected]> + Signed-off-by: Alan Coopersmith <[email protected]> + +commit 40ed9bb3dc87702510d5e54c42a60a2cdd73c135 +Author: Alexandr Shadchin <[email protected]> +Date: Thu Jan 6 13:21:35 2011 +0500 + + Fix default options for PC98 + + Signed-off-by: Alexandr Shadchin <[email protected]> + Signed-off-by: Alan Coopersmith <[email protected]> + +commit e929446a401e73bcc680c488ada2fc50eb225b23 +Author: Alexandr Shadchin <[email protected]> +Date: Thu Jan 6 12:59:19 2011 +0500 + + Removing unused SetKbdRepeat + + Signed-off-by: Alexandr Shadchin <[email protected]> + Signed-off-by: Alan Coopersmith <[email protected]> + +commit cc1a2ba8c9aa3a4bed25394c981b41c903502c84 +Author: Alan Coopersmith <[email protected]> +Date: Thu Dec 23 15:53:32 2010 -0800 + + sun_kbd: Replace deprecated xfree/xcalloc with free & calloc + + Also greatly simplified option/pointer handling to avoid generating + new warnings from passing const char * pointers to free() + + Signed-off-by: Alan Coopersmith <[email protected]> + +commit bd099b5a87399d6ff1fd324172bfcc4bc07a362b +Author: Javier Acosta <[email protected]> +Date: Thu Dec 23 09:43:51 2010 -0800 + + Make key codes for Sun Japanese keyboard match xkb-config mappings + + Solaris bug #7005752: + http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=7005752 + + Signed-off-by: Javier Acosta <[email protected]> + Signed-off-by: Alan Coopersmith <[email protected]> + +commit cb8b2fca90810a1a2d6e5f930e4eac0f929947c6 +Author: Alexandr Shadchin <[email protected]> +Date: Tue Nov 30 20:12:24 2010 +0500 + + Removing unused OpenBSD PCCONS code + + In OpenBSD removed support PCCONS in 2002 year + http://marc.info/?l=openbsd-cvs&m=102435816424294&w=2 + + Signed-off-by: Alexandr Shadchin <[email protected]> + Reviewed-by: Peter Hutterer <[email protected]> + Signed-off-by: Peter Hutterer <[email protected]> + +commit 26af626a2c4afba858a32bbb42077f8661d3de4f +Author: Adam Jackson <[email protected]> +Date: Mon Jan 3 12:42:58 2011 -0500 + + linux: warning fixes + + lnx_KbdMap.c: In function 'KbdGetMapping': + lnx_KbdMap.c:44:17: warning: unused variable 'type' + lnx_KbdMap.c:42:13: warning: unused variable 'pKbd' + + Signed-off-by: Adam Jackson <[email protected]> + +commit 492c14cdd1c4b950c475633a64086235d3550f5b +Author: Alexandr Shadchin <[email protected]> +Date: Mon Jan 3 12:40:25 2011 -0500 + + bsd: Include fix + + Reviewed-by: Adam Jackson <[email protected]> + Signed-off-by: Alexandr Shadchin <[email protected]> + +commit a72c47487b67ad7134045d551dbe222eb4662058 +Author: Alexandr Shadchin <[email protected]> +Date: Mon Jan 3 12:37:34 2011 -0500 + + Remove unused code + + Reviewed-by: Adam Jackson <[email protected]> + Signed-off-by: Alexandr Shadchin <[email protected]> + +commit 6c368bc3aa6d8e1b33d128a22f98ecda0d037e3b +Author: Adam Jackson <[email protected]> +Date: Fri Dec 17 16:35:49 2010 -0500 + + Remove paranoia about event processing during suspend + + Signed-off-by: Adam Jackson <[email protected]> + +commit 155b3e80fc95ea8397bc66fad18f5fa68d54a88e +Author: Alexandr Shadchin <[email protected]> +Date: Mon Nov 29 21:02:39 2010 +0500 + + Removing unused variables vtSwitchSupported and VTSwitchEnabled + + Signed-off-by: Alexandr Shadchin <[email protected]> + Reviewed-by: Alan Coopersmith <[email protected]> + Signed-off-by: Peter Hutterer <[email protected]> + +commit f11f2a7b5643cde57440102ad822995c70b142fb +Author: Alexandr Shadchin <[email protected]> +Date: Sat Nov 27 02:39:13 2010 +0500 + + Removing unused variable kbdType. + + Signed-off-by: Alexandr Shadchin <[email protected]> + Signed-off-by: Peter Hutterer <[email protected]> + +commit 6e97362d7eee5b81bc8681559fbd8a8f6137915c +Author: Peter Hutterer <[email protected]> +Date: Mon Oct 25 15:25:03 2010 +1000 + + Adjust to input ABI 12. + + New PreInit prototype and a few other things. + + Signed-off-by: Peter Hutterer <[email protected]> + Reviewed-by: Chase Douglas <[email protected]> + commit 90f69d7b859caff9f51b6fe20580582a91ed6d0d Author: Alan Coopersmith <[email protected]> Date: Sat Oct 30 09:15:11 2010 -0700 diff --git a/debian/changelog b/debian/changelog index 11d9c17..241bac8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +xserver-xorg-input-keyboard (1:1.5.99.901-1) UNRELEASED; urgency=low + + * New upstream release. + + -- Cyril Brulebois <[email protected]> Mon, 21 Feb 2011 02:28:26 +0100 + xserver-xorg-input-keyboard (1:1.5.0-2) unstable; urgency=low * Switch to dh: commit 6496bb21074faff2642e09389b5476225dc4fdb3 Author: Peter Hutterer <[email protected]> Date: Mon Feb 21 09:59:14 2011 +1000 keyboard 1.5.99.901 Signed-off-by: Peter Hutterer <[email protected]> diff --git a/configure.ac b/configure.ac index f6fdf26..522d2fe 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-input-keyboard], - [1.5.0], + [1.5.99.901], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-input-keyboard]) AC_CONFIG_SRCDIR([Makefile.am]) commit 15f0a4b71b4580c7dd9a0abd7b8fb92756b6733a Author: Alexandr Shadchin <[email protected]> Date: Thu Feb 17 15:40:29 2011 +0500 Removed unnecessary code, since ABI_XINPUT_VERSION >= 2 Signed-off-by: Alexandr Shadchin <[email protected]> Signed-off-by: Peter Hutterer <[email protected]> diff --git a/src/kbd.c b/src/kbd.c index e0f0d33..d89d234 100644 --- a/src/kbd.c +++ b/src/kbd.c @@ -276,51 +276,7 @@ KbdCtrl( DeviceIntPtr device, KeybdCtrl *ctrl) static void InitKBD(InputInfoPtr pInfo, Bool init) { - xEvent kevent; KbdDevPtr pKbd = (KbdDevPtr) pInfo->private; -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 1 - DeviceIntPtr pKeyboard = pInfo->dev; - KeyClassRec *keyc = pKeyboard->key; - KeySym *map = keyc->curKeySyms.map; - unsigned int i; -#endif - - kevent.u.keyButtonPointer.time = GetTimeInMillis(); - kevent.u.keyButtonPointer.rootX = 0; - kevent.u.keyButtonPointer.rootY = 0; - -/* The server does this for us with i-h. */ -#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 1 - /* - * Hmm... here is the biggest hack of every time ! - * It may be possible that a switch-vt procedure has finished BEFORE - * you released all keys neccessary to do this. That peculiar behavior - * can fool the X-server pretty much, cause it assumes that some keys - * were not released. TWM may stuck alsmost completly.... - * OK, what we are doing here is after returning from the vt-switch - * exeplicitely unrelease all keyboard keys before the input-devices - * are reenabled. - */ - for (i = keyc->curKeySyms.minKeyCode, map = keyc->curKeySyms.map; - i < keyc->curKeySyms.maxKeyCode; - i++, map += keyc->curKeySyms.mapWidth) - if (KeyPressed(i)) - { - switch (*map) { - /* Don't release the lock keys */ - case XK_Caps_Lock: - case XK_Shift_Lock: - case XK_Num_Lock: - case XK_Scroll_Lock: - case XK_Kana_Lock: - break; - default: - kevent.u.u.detail = i; - kevent.u.u.type = KeyRelease; - (* pKeyboard->public.processInputProc)(&kevent, pKeyboard, 1); - } - } -#endif pKbd->scanPrefix = 0; commit de7a5c120f646e293cc216007a5df865b41833b8 Author: Alexandr Shadchin <[email protected]> Date: Thu Feb 17 15:40:28 2011 +0500 Require server 1.4 or later Signed-off-by: Alexandr Shadchin <[email protected]> Signed-off-by: Peter Hutterer <[email protected]> diff --git a/configure.ac b/configure.ac index f6ebb96..f6fdf26 100644 --- a/configure.ac +++ b/configure.ac @@ -45,7 +45,7 @@ XORG_MACROS_VERSION(1.8) XORG_DEFAULT_OPTIONS # Obtain compiler/linker options from server and required extensions -PKG_CHECK_MODULES(XORG, [xorg-server >= 1.2.99.0] xproto inputproto) +PKG_CHECK_MODULES(XORG, [xorg-server >= 1.4] xproto inputproto) # Define a configure option for an alternate input module directory AC_ARG_WITH(xorg-module-dir, commit a02757d7c3d8018f44c63553578763fcef41bcca Author: Alexandr Shadchin <[email protected]> Date: Wed Feb 16 13:21:03 2011 +0500 Cleanup set the value of CustomKeycodes Also, do not print values of variables CustomKeycodes twice. Signed-off-by: Alexandr Shadchin <[email protected]> Signed-off-by: Peter Hutterer <[email protected]> diff --git a/src/bsd_kbd.c b/src/bsd_kbd.c index 3b45e22..710470a 100644 --- a/src/bsd_kbd.c +++ b/src/bsd_kbd.c @@ -443,7 +443,6 @@ xf86OSKbdPreInit(InputInfoPtr pInfo) pKbd->RemapScanCode = NULL; pKbd->OpenKeyboard = OpenKeyboard; - pKbd->CustomKeycodes = FALSE; pKbd->private = calloc(sizeof(BsdKbdPrivRec), 1); if (pKbd->private == NULL) { diff --git a/src/hurd_kbd.c b/src/hurd_kbd.c index dde5fbb..8c0cd60 100644 --- a/src/hurd_kbd.c +++ b/src/hurd_kbd.c @@ -158,7 +158,6 @@ xf86OSKbdPreInit(InputInfoPtr pInfo) pKbd->KbdGetMapping = KbdGetMapping; pKbd->RemapScanCode = ATScancode; pKbd->OpenKeyboard = OpenKeyboard; - pKbd->CustomKeycodes = FALSE; pKbd->private = NULL; pInfo->read_input = ReadInput; return TRUE; diff --git a/src/kbd.c b/src/kbd.c index 43a194e..e0f0d33 100644 --- a/src/kbd.c +++ b/src/kbd.c @@ -85,7 +85,6 @@ static const char *kbdDefaults[] = { "XkbRules", "base", "XkbModel", "pc105", "XkbLayout", "us", - "CustomKeycodes", "off", NULL }; @@ -94,7 +93,6 @@ static const char *kbd98Defaults[] = { "XkbRules", "xfree98", "XkbModel", "pc98", "XkbLayout", "jp", - "CustomKeycodes", "off", NULL }; @@ -143,7 +141,6 @@ KbdPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) #endif { KbdDevPtr pKbd; - MessageType from = X_DEFAULT; char *s; const char **defaults; int rc = Success; @@ -212,16 +209,8 @@ KbdPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) xkb_variant = xf86SetStrOption(pInfo->options, "XkbVariant", NULL); xkb_options = xf86SetStrOption(pInfo->options, "XkbOptions", NULL); - pKbd->CustomKeycodes = FALSE; - from = X_DEFAULT; - if (xf86FindOption(pInfo->options, "CustomKeycodes")) { - pKbd->CustomKeycodes = xf86SetBoolOption(pInfo->options, "CustomKeycodes", - pKbd->CustomKeycodes); - from = X_CONFIG; - } - - xf86Msg(from, "%s: CustomKeycodes %s\n", - pInfo->name, pKbd->CustomKeycodes ? "enabled" : "disabled"); + pKbd->CustomKeycodes = xf86SetBoolOption(pInfo->options, "CustomKeycodes", + FALSE); out: return rc; diff --git a/src/sun_kbd.c b/src/sun_kbd.c index 05d1bd9..a240087 100644 --- a/src/sun_kbd.c +++ b/src/sun_kbd.c @@ -518,8 +518,6 @@ xf86OSKbdPreInit(InputInfoPtr pInfo) pKbd->OpenKeyboard = OpenKeyboard; - pKbd->CustomKeycodes = FALSE; - pKbd->private = calloc(sizeof(sunKbdPrivRec), 1); if (pKbd->private == NULL) { xf86Msg(X_ERROR,"can't allocate keyboard OS private data\n"); commit f45f3dbcf1f2a54d7d6a51d6e9884820cff4be12 Author: Alexandr Shadchin <[email protected]> Date: Fri Feb 11 15:33:00 2011 +0500 Do not print values of Protocol twice Protocol printed when found in xf86SetStrOption(). Signed-off-by: Alexandr Shadchin <[email protected]> Signed-off-by: Peter Hutterer <[email protected]> diff --git a/src/bsd_kbd.c b/src/bsd_kbd.c index 127b6ab..3b45e22 100644 --- a/src/bsd_kbd.c +++ b/src/bsd_kbd.c @@ -357,7 +357,6 @@ OpenKeyboard(InputInfoPtr pInfo) free(s); return FALSE; } - xf86Msg(X_CONFIG, "%s: Protocol: %s\n", pInfo->name, s); free(s); s = xf86SetStrOption(pInfo->options, "Device", NULL); diff --git a/src/lnx_kbd.c b/src/lnx_kbd.c index 5292f77..e69e1b6 100644 --- a/src/lnx_kbd.c +++ b/src/lnx_kbd.c @@ -183,7 +183,6 @@ OpenKeyboard(InputInfoPtr pInfo) return FALSE; } - xf86Msg(X_CONFIG, "%s: Protocol: %s\n", pInfo->name, s); free(s); s = xf86SetStrOption(pInfo->options, "Device", NULL); commit 6fca7f2371c113796d4cf27cca5635f3c6fb30af Author: Alexandr Shadchin <[email protected]> Date: Fri Feb 11 15:32:59 2011 +0500 Remove unused XQUEUE Signed-off-by: Alexandr Shadchin <[email protected]> Signed-off-by: Peter Hutterer <[email protected]> diff --git a/src/kbd.c b/src/kbd.c index f4b51ff..43a194e 100644 --- a/src/kbd.c +++ b/src/kbd.c @@ -81,11 +81,7 @@ _X_EXPORT InputDriverRec KEYBOARD = { }; static const char *kbdDefaults[] = { -#ifdef XQUEUE - "Protocol", "Xqueue", -#else "Protocol", "standard", -#endif "XkbRules", "base", "XkbModel", "pc105", "XkbLayout", "us", @@ -94,11 +90,7 @@ static const char *kbdDefaults[] = { }; static const char *kbd98Defaults[] = { -#ifdef XQUEUE - "Protocol", "Xqueue", -#else "Protocol", "standard", -#endif "XkbRules", "xfree98", "XkbModel", "pc98", "XkbLayout", "jp", commit 8a540fa439bd7ea30c49d43ff3339ab599a7ba14 Author: Alexandr Shadchin <[email protected]> Date: Fri Feb 11 15:32:57 2011 +0500 lnx: Fix detect CustomKeycodes for __powerpc__ Signed-off-by: Alexandr Shadchin <[email protected]> Signed-off-by: Peter Hutterer <[email protected]> diff --git a/src/lnx_kbd.c b/src/lnx_kbd.c index 63b51d9..5292f77 100644 --- a/src/lnx_kbd.c +++ b/src/lnx_kbd.c @@ -233,7 +233,7 @@ xf86OSKbdPreInit(InputInfoPtr pInfo) f = fopen("/proc/sys/dev/mac_hid/keyboard_sends_linux_keycodes","r"); if (f) { if (fgetc(f) == '0') - pKbd->CustomKeycodes = TRUE; + xf86ReplaceBoolOption(pInfo->options, "CustomKeycodes", TRUE); fclose(f); } } commit 849f5092efd770cf169ce9950e9dbb0bccbf9017 Author: Alexandr Shadchin <[email protected]> Date: Sat Jan 8 17:09:10 2011 +0500 Removing unused bell_pitch and bell_duration Signed-off-by: Alexandr Shadchin <[email protected]> Signed-off-by: Peter Hutterer <[email protected]> diff --git a/src/xf86OSKbd.h b/src/xf86OSKbd.h index 5e90134..cba049f 100644 --- a/src/xf86OSKbd.h +++ b/src/xf86OSKbd.h @@ -65,8 +65,6 @@ typedef struct { OpenKeyboardProc OpenKeyboard; PostEventProc PostEvent; - int bell_pitch; - int bell_duration; unsigned long leds; unsigned long xledsMask; unsigned long keyLeds; commit dd9ed7921ccffff9cacb6dc128b3f426f9312535 Author: Alexandr Shadchin <[email protected]> Date: Sat Jan 8 20:09:48 2011 +0500 Removing unused PROT_XQUEUE and PROT_USB Signed-off-by: Alexandr Shadchin <[email protected]> Signed-off-by: Peter Hutterer <[email protected]> diff --git a/src/xf86OSKbd.h b/src/xf86OSKbd.h index dc8219a..5e90134 100644 --- a/src/xf86OSKbd.h +++ b/src/xf86OSKbd.h @@ -85,9 +85,7 @@ typedef struct { typedef enum { PROT_STD, - PROT_XQUEUE, PROT_WSCONS, - PROT_USB, PROT_UNKNOWN_KBD } KbdProtocolId; commit 78652023a9f7758635e5507255826d79fbb2b028 Author: Alexandr Shadchin <[email protected]> Date: Sat Jan 8 17:09:38 2011 +0500 bsd: Replace deprecated xfree/xcalloc with free & calloc Signed-off-by: Alexandr Shadchin <[email protected]> Signed-off-by: Peter Hutterer <[email protected]> diff --git a/src/bsd_kbd.c b/src/bsd_kbd.c index ebaeae5..127b6ab 100644 --- a/src/bsd_kbd.c +++ b/src/bsd_kbd.c @@ -354,11 +354,11 @@ OpenKeyboard(InputInfoPtr pInfo) #endif default: xf86Msg(X_ERROR,"\"%s\" is not a valid keyboard protocol name\n", s); - xfree(s); + free(s); return FALSE; } xf86Msg(X_CONFIG, "%s: Protocol: %s\n", pInfo->name, s); - xfree(s); + free(s); s = xf86SetStrOption(pInfo->options, "Device", NULL); if (s == NULL) { @@ -375,12 +375,12 @@ OpenKeyboard(InputInfoPtr pInfo) pInfo->fd = open(s, O_RDONLY | O_NONBLOCK | O_EXCL); if (pInfo->fd == -1) { xf86Msg(X_ERROR, "%s: cannot open \"%s\"\n", pInfo->name, s); - xfree(s); + free(s); return FALSE; } pKbd->isConsole = FALSE; pKbd->consType = xf86Info.consType; - xfree(s); + free(s); } #ifdef WSCONS_SUPPORT @@ -445,8 +445,8 @@ xf86OSKbdPreInit(InputInfoPtr pInfo) pKbd->OpenKeyboard = OpenKeyboard; pKbd->CustomKeycodes = FALSE; - - pKbd->private = xcalloc(sizeof(BsdKbdPrivRec), 1); + + pKbd->private = calloc(sizeof(BsdKbdPrivRec), 1); if (pKbd->private == NULL) { xf86Msg(X_ERROR,"can't allocate keyboard OS private data\n"); return FALSE; commit f7a81ab4225e14a50e26a49a0a17a2cf773a4ab1 Author: Alexandr Shadchin <[email protected]> Date: Sat Jan 8 17:08:41 2011 +0500 Remove random History comment and OS_KBD_VERSION_CURRENT In xf86-input-mouse similar cleanup already done, can also make for keyboard? Signed-off-by: Alexandr Shadchin <[email protected]> Signed-off-by: Peter Hutterer <[email protected]> diff --git a/src/xf86OSKbd.h b/src/xf86OSKbd.h index 561bf89..dc8219a 100644 --- a/src/xf86OSKbd.h +++ b/src/xf86OSKbd.h @@ -97,21 +97,3 @@ typedef struct { } KbdProtocolRec; Bool xf86OSKbdPreInit(InputInfoPtr pInfo); - -/* Adjust this when the kbd interface changes. */ - -/* - * History: - * - * 1.0.0 - Initial version. - */ - -#define OS_KBD_VERSION_MAJOR 1 -#define OS_KBD_VERSION_MINOR 0 -#define OS_KBD_VERSION_PATCH 0 - -#define OS_KBD_VERSION_CURRENT \ - BUILTIN_INTERFACE_VERSION_NUMERIC(OS_KBD_VERSION_MAJOR, \ - OS_KBD_VERSION_MINOR, \ - OS_KBD_VERSION_PATCH) - commit e2f6e5d976ff8bbe68dc41b51d983cc95c11db84 Author: Alexandr Shadchin <[email protected]> Date: Thu Jan 6 14:43:13 2011 +0500 Do not print values of variables XkbRules etc. twice xf86SetStrOption prints in log value of the variables XkbRules etc., there is no need to take this information twice. Signed-off-by: Alexandr Shadchin <[email protected]> Signed-off-by: Alan Coopersmith <[email protected]> diff --git a/src/kbd.c b/src/kbd.c index 2dac655..f4b51ff 100644 --- a/src/kbd.c +++ b/src/kbd.c @@ -60,7 +60,6 @@ static void KbdBell(int percent, DeviceIntPtr dev, pointer ctrl, int unused); static void PostKbdEvent(InputInfoPtr pInfo, unsigned int key, Bool down); static void InitKBD(InputInfoPtr pInfo, Bool init); -static void SetXkbOption(InputInfoPtr pInfo, char *name, char **option); static void UpdateLeds(InputInfoPtr pInfo); _X_EXPORT InputDriverRec KBD = { @@ -113,22 +112,6 @@ static char *xkb_layout; static char *xkb_variant; static char *xkb_options; -static void -SetXkbOption(InputInfoPtr pInfo, char *name, char **option) -{ - char *s; - - if ((s = xf86SetStrOption(pInfo->options, name, NULL))) { - if (!s[0]) { - free(s); - *option = NULL; - } else { - *option = s; - xf86Msg(X_CONFIG, "%s: %s: \"%s\"\n", pInfo->name, name, s); - } - } -} - #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 static int NewKbdPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags); @@ -231,11 +214,11 @@ KbdPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) free(s); } - SetXkbOption(pInfo, "XkbRules", &xkb_rules); - SetXkbOption(pInfo, "XkbModel", &xkb_model); - SetXkbOption(pInfo, "XkbLayout", &xkb_layout); - SetXkbOption(pInfo, "XkbVariant", &xkb_variant); - SetXkbOption(pInfo, "XkbOptions", &xkb_options); + xkb_rules = xf86SetStrOption(pInfo->options, "XkbRules", NULL); + xkb_model = xf86SetStrOption(pInfo->options, "XkbModel", NULL); + xkb_layout = xf86SetStrOption(pInfo->options, "XkbLayout", NULL); + xkb_variant = xf86SetStrOption(pInfo->options, "XkbVariant", NULL); + xkb_options = xf86SetStrOption(pInfo->options, "XkbOptions", NULL); pKbd->CustomKeycodes = FALSE; from = X_DEFAULT; commit 7d03efb3a3af77ca6831492a793d18b89cc64083 Author: Alexandr Shadchin <[email protected]> Date: Thu Jan 6 13:37:39 2011 +0500 bsd: Fix print wscons type keyboard for Sun5 Signed-off-by: Alexandr Shadchin <[email protected]> Signed-off-by: Alan Coopersmith <[email protected]> diff --git a/src/bsd_kbd.c b/src/bsd_kbd.c index d0cedcd..ebaeae5 100644 --- a/src/bsd_kbd.c +++ b/src/bsd_kbd.c @@ -413,9 +413,9 @@ OpenKeyboard(InputInfoPtr pInfo) break; #endif #ifdef WSKBD_TYPE_SUN5 - case WSKBD_TYPE_SUN5: - xf86Msg(X_PROBED, "Keyboard type: Sun5\n"); - break; + case WSKBD_TYPE_SUN5: + printWsType("Sun5", pInfo->name); + break; #endif default: xf86Msg(X_ERROR, "%s: Unsupported wskbd type \"%d\"", commit 40ed9bb3dc87702510d5e54c42a60a2cdd73c135 Author: Alexandr Shadchin <[email protected]> Date: Thu Jan 6 13:21:35 2011 +0500 Fix default options for PC98 Signed-off-by: Alexandr Shadchin <[email protected]> Signed-off-by: Alan Coopersmith <[email protected]> diff --git a/src/kbd.c b/src/kbd.c index 629b534..2dac655 100644 --- a/src/kbd.c +++ b/src/kbd.c @@ -190,7 +190,7 @@ KbdPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) defaults = kbdDefaults; else defaults = kbd98Defaults; - xf86CollectInputOptions(pInfo, kbdDefaults + xf86CollectInputOptions(pInfo, defaults #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 , NULL #endif commit e929446a401e73bcc680c488ada2fc50eb225b23 Author: Alexandr Shadchin <[email protected]> Date: Thu Jan 6 12:59:19 2011 +0500 Removing unused SetKbdRepeat Signed-off-by: Alexandr Shadchin <[email protected]> Signed-off-by: Alan Coopersmith <[email protected]> diff --git a/src/bsd_kbd.c b/src/bsd_kbd.c index ebf16c2..d0cedcd 100644 --- a/src/bsd_kbd.c +++ b/src/bsd_kbd.c @@ -138,25 +138,6 @@ GetKbdLeds(InputInfoPtr pInfo) return(leds); } -static void -SetKbdRepeat(InputInfoPtr pInfo, char rad) -{ - KbdDevPtr pKbd = (KbdDevPtr) pInfo->private; - switch (pKbd->consType) { - -#ifdef PCCONS_SUPPORT - case PCCONS: - break; -#endif -#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT) - case SYSCONS: - case PCVT: - ioctl(pInfo->fd, KDSETRAD, rad); - break; -#endif - } -} - static int KbdOn(InputInfoPtr pInfo, int what) { @@ -458,7 +439,6 @@ xf86OSKbdPreInit(InputInfoPtr pInfo) pKbd->Bell = SoundBell; pKbd->SetLeds = SetKbdLeds; pKbd->GetLeds = GetKbdLeds; - pKbd->SetKbdRepeat = SetKbdRepeat; pKbd->KbdGetMapping = KbdGetMapping; pKbd->RemapScanCode = NULL; diff --git a/src/hurd_kbd.c b/src/hurd_kbd.c index 27746da..dde5fbb 100644 --- a/src/hurd_kbd.c +++ b/src/hurd_kbd.c @@ -95,12 +95,6 @@ GetKbdLeds(InputInfoPtr pInfo) return 0; } -static void -SetKbdRepeat(InputInfoPtr pInfo, char rad) -{ - return; -} - static void KbdGetMapping(InputInfoPtr pInfo, KeySymsPtr pKeySyms, CARD8 *pModMap) { @@ -161,7 +155,6 @@ xf86OSKbdPreInit(InputInfoPtr pInfo) pKbd->Bell = SoundKbdBell; pKbd->SetLeds = SetKbdLeds; pKbd->GetLeds = GetKbdLeds; - pKbd->SetKbdRepeat = SetKbdRepeat; pKbd->KbdGetMapping = KbdGetMapping; pKbd->RemapScanCode = ATScancode; pKbd->OpenKeyboard = OpenKeyboard; diff --git a/src/sun_kbd.c b/src/sun_kbd.c index 4dcd01b..05d1bd9 100644 --- a/src/sun_kbd.c +++ b/src/sun_kbd.c @@ -409,13 +409,6 @@ GetKbdLeds(InputInfoPtr pInfo) return leds; } -/* ARGSUSED0 */ -static void -SetKbdRepeat(InputInfoPtr pInfo, char rad) -{ - /* Nothing to do */ -} - static void CloseKeyboard(InputInfoPtr pInfo) { @@ -519,7 +512,6 @@ xf86OSKbdPreInit(InputInfoPtr pInfo) pKbd->Bell = SoundKbdBell; pKbd->SetLeds = SetKbdLeds; pKbd->GetLeds = GetKbdLeds; - pKbd->SetKbdRepeat = SetKbdRepeat; pKbd->KbdGetMapping = KbdGetMapping; pKbd->RemapScanCode = NULL; diff --git a/src/xf86OSKbd.h b/src/xf86OSKbd.h index 0e9fa4d..561bf89 100644 --- a/src/xf86OSKbd.h +++ b/src/xf86OSKbd.h @@ -40,7 +40,6 @@ typedef void (*BellProc)(InputInfoPtr pInfo, int loudness, int pitch, int duration); typedef void (*SetLedsProc)(InputInfoPtr pInfo, int leds); typedef int (*GetLedsProc)(InputInfoPtr pInfo); -typedef void (*SetKbdRepeatProc)(InputInfoPtr pInfo, char rad); typedef void (*KbdGetMappingProc)(InputInfoPtr pInfo, KeySymsPtr pKeySyms, CARD8* pModMap); typedef int (*RemapScanCodeProc)(InputInfoPtr pInfo, int *scanCode); @@ -60,7 +59,6 @@ typedef struct { BellProc Bell; SetLedsProc SetLeds; GetLedsProc GetLeds; - SetKbdRepeatProc SetKbdRepeat; KbdGetMappingProc KbdGetMapping; RemapScanCodeProc RemapScanCode; commit cc1a2ba8c9aa3a4bed25394c981b41c903502c84 Author: Alan Coopersmith <[email protected]> Date: Thu Dec 23 15:53:32 2010 -0800 sun_kbd: Replace deprecated xfree/xcalloc with free & calloc Also greatly simplified option/pointer handling to avoid generating new warnings from passing const char * pointers to free() -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

