From c17cc96698891b1fc9a74c50df46c3d60b4b7bd9 Mon Sep 17 00:00:00 2001 From: Thorvald Natvig Date: Fri, 10 Aug 2007 15:24:05 +0000 Subject: Support kernel input devices on Linux git-svn-id: https://mumble.svn.sourceforge.net/svnroot/mumble/trunk@714 05730e5d-ab1b-0410-a4ac-84af385074fa --- src/mumble/GlobalShortcut_unix.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/mumble/GlobalShortcut_unix.h') 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 qmShortcuts; QHash qhGlobalToX; + QList qlInputDevices; bool globalEvent(XEvent *); bool bGrabbing; bool bNeedRemap; void grab(); void release(); QMultiHash 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 getCurrentButtons(); + public slots: + void inputReadyRead(int); signals: void buttonPressed(bool); }; -- cgit v1.2.3