aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/General
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2019-07-13 19:01:49 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2019-07-13 19:01:49 +0000
commit912df70e6936c43e5f9230f58f51fdb31c391346 (patch)
tree4f774629eba3ec4659c9aba97a5662fd270083de /src/plugins/General
parentad4866f45f5f391a638e67385cf9604fcde37351 (diff)
downloadqmmp-912df70e6936c43e5f9230f58f51fdb31c391346.tar.gz
qmmp-912df70e6936c43e5f9230f58f51fdb31c391346.tar.bz2
qmmp-912df70e6936c43e5f9230f58f51fdb31c391346.zip
hotkey: do not crash on wayland session
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@8997 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General')
-rw-r--r--src/plugins/General/hotkey/hotkeymanager_x11.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/General/hotkey/hotkeymanager_x11.cpp b/src/plugins/General/hotkey/hotkeymanager_x11.cpp
index 016f132ba..26aac352b 100644
--- a/src/plugins/General/hotkey/hotkeymanager_x11.cpp
+++ b/src/plugins/General/hotkey/hotkeymanager_x11.cpp
@@ -78,6 +78,12 @@ quint32 Hotkey::defaultKey(int act)
HotkeyManager::HotkeyManager(QObject *parent) : QObject(parent)
{
+ if(!QX11Info::isPlatformX11())
+ {
+ qWarning("HotkeyManager: X11 not found. Plugin disabled");
+ return;
+ }
+
QCoreApplication::instance()->installEventFilter(this);
WId rootWindow = DefaultRootWindow(QX11Info::display());
QSettings settings(Qmmp::configFile(), QSettings::IniFormat); //load settings