Ludwig Nussel
588ddc59f2
ok OBS-URL: https://build.opensuse.org/request/show/56216 OBS-URL: https://build.opensuse.org/package/show/games:tools/mumble?expand=0&rev=1
21 lines
1.1 KiB
C++
21 lines
1.1 KiB
C++
Index: mumble-1.1.6/src/mumble/GlobalShortcut_unix.cpp
|
|
===================================================================
|
|
--- mumble-1.1.6.orig/src/mumble/GlobalShortcut_unix.cpp
|
|
+++ mumble-1.1.6/src/mumble/GlobalShortcut_unix.cpp
|
|
@@ -264,7 +264,14 @@ void GlobalShortcutX::directoryChanged(c
|
|
char name[256];
|
|
uint8_t events[EV_MAX/8 + 1];
|
|
memset(events, 0, sizeof(events));
|
|
- if ((ioctl(fd, EVIOCGVERSION, &version) >= 0) && (ioctl(fd, EVIOCGNAME(sizeof(name)), name)>=0) && (ioctl(fd, EVIOCGBIT(0,sizeof(events)), &events) >= 0) && test_bit(EV_KEY, events) && (((version >> 16) & 0xFF) > 0)) {
|
|
+ if ((ioctl(fd, EVIOCGVERSION, &version) >= 0)
|
|
+ && (ioctl(fd, EVIOCGNAME(sizeof(name)), name)>=0)
|
|
+ && (ioctl(fd, EVIOCGBIT(0,sizeof(events)), &events) >= 0)
|
|
+ && test_bit(EV_KEY, events)
|
|
+ // we assume it's a keyboard if it has a space bar
|
|
+ && (ioctl(fd, EVIOCGBIT(EV_KEY,sizeof(events)), &events) >= 0)
|
|
+ && test_bit(KEY_SPACE, events)
|
|
+ && (((version >> 16) & 0xFF) > 0)) {
|
|
name[255]=0;
|
|
qWarning("GlobalShortcutX: %s: %s", qPrintable(f->fileName()), name);
|
|
fcntl(f->handle(), F_SETFL, O_NONBLOCK);
|