Prevent global shortcut crash on wayland.
The 3rd party qxt library assumes X11 on linux systems. Don't register QxtGlobalShortcutBackend when using Wayland.
This commit is contained in:
parent
60d3435324
commit
2179027a6d
@ -23,12 +23,17 @@
|
||||
#include "core/logging.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QGuiApplication>
|
||||
#include <QtDebug>
|
||||
|
||||
QxtGlobalShortcutBackend::QxtGlobalShortcutBackend(GlobalShortcuts* parent)
|
||||
: GlobalShortcutBackend(parent) {}
|
||||
|
||||
bool QxtGlobalShortcutBackend::DoRegister() {
|
||||
if (QGuiApplication::platformName() == "wayland") {
|
||||
qLog(Warning) << "No support for Wayland in qxt.";
|
||||
return false;
|
||||
}
|
||||
qLog(Debug) << "registering";
|
||||
for (const GlobalShortcuts::Shortcut& shortcut :
|
||||
manager_->shortcuts().values()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user