Commit 4688fc22 authored by Kaleb Keithley Keithley's avatar Kaleb Keithley Keithley
Browse files

merge latest (4.3.99.16) from XFree86 (vendor) branch

parent 219156b4
...@@ -27,7 +27,7 @@ used in advertising or otherwise to promote the sale, use or other dealings ...@@ -27,7 +27,7 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group. in this Software without prior written authorization from The Open Group.
*/ */
/* $XFree86: xc/programs/xset/xset.c,v 3.30 2003/02/06 18:48:17 dawes Exp $ */ /* $XFree86: xc/programs/xset/xset.c,v 3.32 2003/09/24 02:43:39 dawes Exp $ */
/* Modified by Stephen so keyboard rate is set using XKB extensions */ /* Modified by Stephen so keyboard rate is set using XKB extensions */
#include <stdio.h> #include <stdio.h>
...@@ -487,15 +487,15 @@ for (i = 1; i < argc; ) { ...@@ -487,15 +487,15 @@ for (i = 1; i < argc; ) {
} }
arg = argv[i]; arg = argv[i];
if (*arg >= '0' && *arg <= '9') { if (*arg >= '0' && *arg <= '9') {
sscanf(arg, "%hd", &standby_timeout); sscanf(arg, "%hu", &standby_timeout);
i++; i++;
arg = argv[i]; arg = argv[i];
if ((arg)&&(*arg >= '0' && *arg <= '9')) { if ((arg)&&(*arg >= '0' && *arg <= '9')) {
sscanf(arg, "%hd", &suspend_timeout); sscanf(arg, "%hu", &suspend_timeout);
i++; i++;
arg = argv[i]; arg = argv[i];
if ((arg)&&(*arg >= '0' && *arg <= '9')) { if ((arg)&&(*arg >= '0' && *arg <= '9')) {
sscanf(arg, "%hd", &off_timeout); sscanf(arg, "%hu", &off_timeout);
i++; i++;
arg = argv[i]; arg = argv[i];
} }
...@@ -691,8 +691,8 @@ for (i = 1; i < argc; ) { ...@@ -691,8 +691,8 @@ for (i = 1; i < argc; ) {
#if defined(XF86MISC) || defined(XKB) #if defined(XF86MISC) || defined(XKB)
else if (strcmp(arg, "rate") == 0) { /* ...or this one. */ else if (strcmp(arg, "rate") == 0) { /* ...or this one. */
int delay = 0, rate = 0; int delay = 0, rate = 0;
int rate_set = 0;
#ifdef XF86MISC #ifdef XF86MISC
int rate_set = 0;
if (XF86MiscQueryVersion(dpy, &major, &minor)) { if (XF86MiscQueryVersion(dpy, &major, &minor)) {
delay=KBDDELAY_DEFAULT, rate=KBDRATE_DEFAULT; delay=KBDDELAY_DEFAULT, rate=KBDRATE_DEFAULT;
} else { } else {
...@@ -728,7 +728,9 @@ for (i = 1; i < argc; ) { ...@@ -728,7 +728,9 @@ for (i = 1; i < argc; ) {
#ifdef XKB #ifdef XKB
if (xkbpresent) { if (xkbpresent) {
xkbset_repeatrate(dpy, delay, 1000/rate); xkbset_repeatrate(dpy, delay, 1000/rate);
#ifdef XF86MISC
rate_set = 1; rate_set = 1;
#endif
} }
#endif #endif
#ifdef XF86MISC #ifdef XF86MISC
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment