diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2018-07-08 09:07:03 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2018-07-08 09:07:03 +0000 |
| commit | 589a687243cf2d78f38cada1fef0a127ee373af0 (patch) | |
| tree | 4d5f8316522a9ab44ad345cb16280233909eafea /src/plugins/General/hotkey/hotkeymanager.h | |
| parent | b97d5da365d53ef73af199985d4f2091f863fd85 (diff) | |
| download | qmmp-589a687243cf2d78f38cada1fef0a127ee373af0.tar.gz qmmp-589a687243cf2d78f38cada1fef0a127ee373af0.tar.bz2 qmmp-589a687243cf2d78f38cada1fef0a127ee373af0.zip | |
hotkey: using QAbstractNativeEventFilter
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@8115 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/hotkey/hotkeymanager.h')
| -rw-r--r-- | src/plugins/General/hotkey/hotkeymanager.h | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/plugins/General/hotkey/hotkeymanager.h b/src/plugins/General/hotkey/hotkeymanager.h index b7674f78d..16176bfe6 100644 --- a/src/plugins/General/hotkey/hotkeymanager.h +++ b/src/plugins/General/hotkey/hotkeymanager.h @@ -24,9 +24,7 @@ #include <QString> #include <QTableWidgetItem> #include <QList> -#ifdef Q_OS_WIN #include <QAbstractNativeEventFilter> -#endif #include <qmmpui/general.h> class QEvent; @@ -72,7 +70,7 @@ public: static quint32 defaultKey(int act); }; -class HotkeyManager : public QObject +class HotkeyManager : public QObject, public QAbstractNativeEventFilter { Q_OBJECT public: @@ -84,21 +82,10 @@ public: static QList<long> ignModifiersList(); static quint32 keycodeToKeysym(quint32 keycode); -#ifdef QMMP_WS_X11 -protected: - virtual bool eventFilter(QObject* o, QEvent* e); -#endif - private: + bool nativeEventFilter(const QByteArray &eventType, void *message, long *result); #ifdef QMMP_WS_X11 - static void ensureModifiers(); QList <Hotkey *> m_grabbedKeys; - static long m_alt_mask; - static long m_meta_mask; - static long m_super_mask; - static long m_hyper_mask; - static long m_numlock_mask; - static bool m_haveMods; #endif #ifdef Q_OS_WIN |
