diff options
author | Timothy Pearson <[email protected]> | 2013-04-06 21:01:31 -0500 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2013-04-06 21:01:31 -0500 |
commit | 8d2f9ae31522a472de122e849d206a869f248773 (patch) | |
tree | 93a264e1e241518d0dbb966dae8aa3d068bf66cf /tsak/main.cpp | |
parent | dc41de959b6b76263f8640c4075a6ed5b873b722 (diff) | |
download | tdebase-8d2f9ae31522a472de122e849d206a869f248773.tar.gz tdebase-8d2f9ae31522a472de122e849d206a869f248773.zip |
Do not load virtual keyboards in tsak
This resolves Bug 1275
Diffstat (limited to 'tsak/main.cpp')
-rw-r--r-- | tsak/main.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/tsak/main.cpp b/tsak/main.cpp index 7b3202f16..8fa36f4ab 100644 --- a/tsak/main.cpp +++ b/tsak/main.cpp @@ -234,11 +234,16 @@ int find_keyboards() { // Ensure that we do not detect our own tsak faked keyboards ioctl (fd, EVIOCGNAME(sizeof(name)), name); if (str_ends_with(name, "+tsak") == 0) { - /* We assume that anything that has an alphabetic key in the - QWERTYUIOP range in it is the main keyboard. */ - for (j = KEY_Q; j <= KEY_P; j++) { - if (TestBit(j, key_bitmask)) { - keyboard_fds[keyboard_fd_num] = fd; + // Do not attempt to use virtual keyboards per Bug 1275 + struct input_id input_info; + ioctl (fd, EVIOCGID, &input_info); + if ((input_info.vendor != 0) && (input_info.product != 0)) { + /* We assume that anything that has an alphabetic key in the + QWERTYUIOP range in it is the main keyboard. */ + for (j = KEY_Q; j <= KEY_P; j++) { + if (TestBit(j, key_bitmask)) { + keyboard_fds[keyboard_fd_num] = fd; + } } } } |