Add some bounds checking.
2002-05-30 Jody Goldberg <jody@gnome.org> * gnome-settings-keyboard.c (xkb_set_keyboard_autorepeat_rate) : Add some bounds checking.
This commit is contained in:
parent
e6ed3e6a01
commit
cd185dae21
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2002-05-30 Jody Goldberg <jody@gnome.org>
|
||||
|
||||
* gnome-settings-keyboard.c (xkb_set_keyboard_autorepeat_rate) : Add
|
||||
some bounds checking.
|
||||
|
||||
Wed May 29 20:23:13 2002 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* Makefile.am: Add gnome-settings-keybinding
|
||||
|
|
|
@ -71,8 +71,10 @@ xfree86_set_keyboard_autorepeat_rate (int delay, int rate)
|
|||
static gboolean
|
||||
xkb_set_keyboard_autorepeat_rate (int delay, int rate)
|
||||
{
|
||||
int interval = (rate <= 0) ? 1000000 : 1000/rate;
|
||||
if (delay <= 0) delay = 1;
|
||||
return XkbSetAutoRepeatRate (GDK_DISPLAY (), XkbUseCoreKbd,
|
||||
delay, 1000/rate);
|
||||
delay, interval);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue