diff options
Diffstat (limited to 'src/mumble/GlobalShortcut_unix.h')
-rw-r--r-- | src/mumble/GlobalShortcut_unix.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mumble/GlobalShortcut_unix.h b/src/mumble/GlobalShortcut_unix.h index 1694ec38f..05a977412 100644 --- a/src/mumble/GlobalShortcut_unix.h +++ b/src/mumble/GlobalShortcut_unix.h @@ -68,24 +68,28 @@ class GlobalShortcutXConfig : public ConfigWidget { void accept(); }; +#define NUM_BUTTONS 0x2ff + class GlobalShortcutX : public QThread { Q_OBJECT public: Display *display; int ref; bool bRunning; - bool activeMap[320]; - bool touchMap[320]; + bool activeMap[NUM_BUTTONS]; + bool touchMap[NUM_BUTTONS]; bool bFirstMouseReleased; QHash<int, GlobalShortcut *> qmShortcuts; QHash<GlobalShortcut *, Shortcut *> qhGlobalToX; + QList<QFile *> qlInputDevices; bool globalEvent(XEvent *); bool bGrabbing; bool bNeedRemap; void grab(); void release(); QMultiHash<int, Shortcut *> qmhKeyToShortcut; - public: + void handleEvent(int evtcode, bool down); + GlobalShortcutX(); ~GlobalShortcutX(); void run(); @@ -94,6 +98,8 @@ class GlobalShortcutX : public QThread { void add(GlobalShortcut *); void remove(GlobalShortcut *); QList<int> getCurrentButtons(); + public slots: + void inputReadyRead(int); signals: void buttonPressed(bool); }; |