Use HAVE_X11_GLOBALSHORTCUTS
This commit is contained in:
@@ -19,6 +19,7 @@
|
|||||||
#cmakedefine HAVE_QTSPARKLE
|
#cmakedefine HAVE_QTSPARKLE
|
||||||
#cmakedefine HAVE_MUSICBRAINZ
|
#cmakedefine HAVE_MUSICBRAINZ
|
||||||
#cmakedefine HAVE_GLOBALSHORTCUTS
|
#cmakedefine HAVE_GLOBALSHORTCUTS
|
||||||
|
#cmakedefine HAVE_X11_GLOBALSHORTCUTS
|
||||||
#cmakedefine USE_INSTALL_PREFIX
|
#cmakedefine USE_INSTALL_PREFIX
|
||||||
|
|
||||||
#cmakedefine HAVE_GSTREAMER
|
#cmakedefine HAVE_GSTREAMER
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
# include "globalshortcutsbackend-gnome.h"
|
# include "globalshortcutsbackend-gnome.h"
|
||||||
# include "globalshortcutsbackend-mate.h"
|
# include "globalshortcutsbackend-mate.h"
|
||||||
#endif
|
#endif
|
||||||
#if (defined(HAVE_X11) && defined(HAVE_QPA_QPLATFORMNATIVEINTERFACE_H)) || defined(Q_OS_WIN)
|
#if defined(HAVE_X11_GLOBALSHORTCUTS) || defined(Q_OS_WIN)
|
||||||
# include "globalshortcutsbackend-system.h"
|
# include "globalshortcutsbackend-system.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef Q_OS_MACOS
|
#ifdef Q_OS_MACOS
|
||||||
@@ -97,11 +97,11 @@ GlobalShortcutsManager::GlobalShortcutsManager(QWidget *parent)
|
|||||||
if (!system_backend_)
|
if (!system_backend_)
|
||||||
system_backend_ = new GlobalShortcutsBackendMacOS(this);
|
system_backend_ = new GlobalShortcutsBackendMacOS(this);
|
||||||
#endif
|
#endif
|
||||||
#if defined(Q_OS_WIN)
|
#ifdef Q_OS_WIN
|
||||||
if (!system_backend_)
|
if (!system_backend_)
|
||||||
system_backend_ = new GlobalShortcutsBackendSystem(this);
|
system_backend_ = new GlobalShortcutsBackendSystem(this);
|
||||||
#endif
|
#endif
|
||||||
#if defined(HAVE_X11) && defined(HAVE_QPA_QPLATFORMNATIVEINTERFACE_H)
|
#ifdef HAVE_X11_GLOBALSHORTCUTS
|
||||||
if (!system_backend_ && IsX11Available())
|
if (!system_backend_ && IsX11Available())
|
||||||
system_backend_ = new GlobalShortcutsBackendSystem(this);
|
system_backend_ = new GlobalShortcutsBackendSystem(this);
|
||||||
#endif
|
#endif
|
||||||
@@ -190,12 +190,14 @@ void GlobalShortcutsManager::Register() {
|
|||||||
if (use_kde_ && kde_backend_ && kde_backend_->Register()) return;
|
if (use_kde_ && kde_backend_ && kde_backend_->Register()) return;
|
||||||
if (use_gnome_ && gnome_backend_ && gnome_backend_->Register()) return;
|
if (use_gnome_ && gnome_backend_ && gnome_backend_->Register()) return;
|
||||||
if (use_mate_ && mate_backend_ && mate_backend_->Register()) return;
|
if (use_mate_ && mate_backend_ && mate_backend_->Register()) return;
|
||||||
#if defined(HAVE_X11) && defined(HAVE_QPA_QPLATFORMNATIVEINTERFACE_H) // If this system has X11, only use the system backend if X11 is enabled in the global shortcut settings
|
|
||||||
|
#ifdef HAVE_X11_GLOBALSHORTCUTS
|
||||||
if (use_x11_) {
|
if (use_x11_) {
|
||||||
#endif
|
#endif
|
||||||
if (system_backend_)
|
if (system_backend_) {
|
||||||
system_backend_->Register();
|
system_backend_->Register();
|
||||||
#if defined(HAVE_X11) && defined(HAVE_QPA_QPLATFORMNATIVEINTERFACE_H)
|
}
|
||||||
|
#ifdef HAVE_X11_GLOBALSHORTCUTS
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ GlobalShortcutsSettingsPage::GlobalShortcutsSettingsPage(SettingsDialog *dialog)
|
|||||||
QObject::connect(ui_->button_gnome_open, &QPushButton::clicked, this, &GlobalShortcutsSettingsPage::OpenGnomeKeybindingProperties);
|
QObject::connect(ui_->button_gnome_open, &QPushButton::clicked, this, &GlobalShortcutsSettingsPage::OpenGnomeKeybindingProperties);
|
||||||
QObject::connect(ui_->button_mate_open, &QPushButton::clicked, this, &GlobalShortcutsSettingsPage::OpenMateKeybindingProperties);
|
QObject::connect(ui_->button_mate_open, &QPushButton::clicked, this, &GlobalShortcutsSettingsPage::OpenMateKeybindingProperties);
|
||||||
# endif
|
# endif
|
||||||
# if defined(HAVE_X11) && defined(HAVE_QPA_QPLATFORMNATIVEINTERFACE_H)
|
# ifdef HAVE_X11_GLOBALSHORTCUTS
|
||||||
QObject::connect(ui_->checkbox_x11, &QCheckBox::toggled, this, &GlobalShortcutsSettingsPage::ShortcutOptionsChanged);
|
QObject::connect(ui_->checkbox_x11, &QCheckBox::toggled, this, &GlobalShortcutsSettingsPage::ShortcutOptionsChanged);
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user