From b0bfb7ce656663df4364b9ee8ad073046bd384ac Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Mon, 17 Jan 2011 10:45:46 +0000 Subject: [PATCH] [Bugfix] Disable server-side key autorepeating. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4235 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- unix/xserver/hw/vnc/Input.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/unix/xserver/hw/vnc/Input.cc b/unix/xserver/hw/vnc/Input.cc index 87151d9b..dd1cfb86 100644 --- a/unix/xserver/hw/vnc/Input.cc +++ b/unix/xserver/hw/vnc/Input.cc @@ -533,6 +533,9 @@ void InputDevice::keyEvent(rdr::U32 keysym, bool down) int mapWidth; unsigned int i; int j, k, state, maxKeysPerMod; +#if XORG >= 17 + KeybdCtrl ctrl; +#endif initInputDevice(); @@ -582,6 +585,18 @@ void InputDevice::keyEvent(rdr::U32 keysym, bool down) maxKeyCode = keymap->maxKeyCode; mapWidth = keymap->mapWidth; +#if XORG >= 17 + /* + * No server-side key repeating, please. Some clients won't work well, + * check https://bugzilla.redhat.com/show_bug.cgi?id=607866. + */ + ctrl = keyboardDev->kbdfeed->ctrl; + if (ctrl.autoRepeat != FALSE) { + ctrl.autoRepeat = FALSE; + XkbSetRepeatKeys(keyboardDev, -1, ctrl.autoRepeat); + } +#endif + /* find which modifier Mode_switch is on. */ int modeSwitchMapIndex = 0; for (i = 3; i < 8; i++) { -- 2.39.5