diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2021-08-05 04:09:39 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2021-08-06 02:36:43 +0900 |
commit | 012d28407a2175f084a30b674e323e0b1983857d (patch) | |
tree | ebfa6e3e5cd02204f653ba1e9fdf5caef65539ea | |
parent | b6ef8039c18eb384820376433d253fa0c5d70514 (diff) | |
download | thotkeys-012d28407a2175f084a30b674e323e0b1983857d.tar.gz |
relax duplicate device name checking
My Logitech G502 has two "Logitech Gaming Mouse G502 Keyboard" - one as
a slave keyboard and another as a slave pointer. The latter is
irrelevant here and can be ignored.
-rw-r--r-- | thotkeys.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -60,11 +60,11 @@ static XDeviceInfo *get_device_info(Display *display, const char *name) for (int i = 0; i < num_devices; i++) { XDeviceInfo *device = &devices[i]; - if (device->use < IsXExtensionDevice) + if (device->use != IsXExtensionKeyboard) continue; if (!strcmp(device->name, name) || use_id && (long)device->id == id) { if (found) - fatal("more than one device found with the " \ + fatal("more than one keyboard found with the " \ "name '%s'\n", name); found = device; } |