diff options
author | lambroslambrou@chromium.org <lambroslambrou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-07 02:00:42 +0000 |
---|---|---|
committer | lambroslambrou@chromium.org <lambroslambrou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-07 02:00:42 +0000 |
commit | 5281a6793553669943ba5b873b80dd857e87a915 (patch) | |
tree | 911982d2578661ce917b4aea8be81729ca1265d6 /remoting/tools | |
parent | baecb9d990af75f4783ee3173bd17aff44e58808 (diff) | |
download | chromium_src-5281a6793553669943ba5b873b80dd857e87a915.zip chromium_src-5281a6793553669943ba5b873b80dd857e87a915.tar.gz chromium_src-5281a6793553669943ba5b873b80dd857e87a915.tar.bz2 |
Suppress key-repeat on Linux host
This ensures that key-repeat is controlled by the client, not the host (so that
network latency will not trigger key-repeat on the host if the release event is
delayed). To test this, disable key-repeat on the client machine (on Linux,
run "xset r off"). Then verify that this works over a connection to a Linux
host (key presses from the client are not auto-repeated on the host).
This implementation should work for both IT2Me and Me2Me. In the IT2Me case,
the local user of the host machine should experience key-repeats normally.
The host's global preference for auto-repeat is not permanently changed; the
auto-repeat is only suppressed whilst keys are pressed from the client.
BUG=115972
TEST=Manual
Review URL: http://codereview.chromium.org/9614011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125288 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/tools')
-rwxr-xr-x | remoting/tools/me2me_virtual_host.py | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/remoting/tools/me2me_virtual_host.py b/remoting/tools/me2me_virtual_host.py index e6fa6bb..b0eb122 100755 --- a/remoting/tools/me2me_virtual_host.py +++ b/remoting/tools/me2me_virtual_host.py @@ -25,7 +25,6 @@ import socket import subprocess import sys import tempfile -import threading import time import urllib2 import uuid @@ -332,14 +331,6 @@ class Desktop: if not self.session_proc.pid: raise Exception("Could not start X session") - # Allow some time for the desktop session to launch before disabling - # key-repeat, since the desktop environment may enable key-repeat during - # initialization. - - # TODO(lambroslambrou): A more robust solution would be for the host - # process to disable key-repeat in its (per-platform) event-injection code. - threading.Timer(30, self.disable_key_repeat).start() - def launch_host(self, host): # Start remoting host args = [locate_executable(REMOTING_COMMAND), @@ -348,13 +339,6 @@ class Desktop: if not self.host_proc.pid: raise Exception("Could not start remoting host") - def disable_key_repeat(self): - logging.info("Disabling keyboard auto-repeat") - try: - subprocess.call(["xset", "r", "off"], env=self.child_env) - except OSError, e: - logging.error("Failed to disable keyboard auto-repeat: " + str(e)) - class PidFile: """Class to allow creating and deleting a file which holds the PID of the |