-
-
Save hifi/e32c03f7b131cfc9e2d38c1ca11764fe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/cmake/FindXkbcommon.cmake b/cmake/FindXkbcommon.cmake | |
index 75a55649..0577b558 100644 | |
--- a/cmake/FindXkbcommon.cmake | |
+++ b/cmake/FindXkbcommon.cmake | |
@@ -3,4 +3,4 @@ find_package(PkgConfig) | |
pkg_check_modules(Xkbcommon xkbcommon) | |
include(FindPackageHandleStandardArgs) | |
-find_package_handle_standard_args(Xkbcommon DEFAULT_MSG Xkbcommon_LIBRARIES Xkbcommon_INCLUDE_DIRS) | |
+find_package_handle_standard_args(Xkbcommon DEFAULT_MSG Xkbcommon_LIBRARIES Xkbcommon_INCLUDEDIR) | |
diff --git a/src/autotype/AutoType.cpp b/src/autotype/AutoType.cpp | |
index a403514e..1dbd3572 100644 | |
--- a/src/autotype/AutoType.cpp | |
+++ b/src/autotype/AutoType.cpp | |
@@ -295,7 +295,7 @@ void AutoType::executeAutoTypeActions(const Entry* entry, | |
macUtils()->raiseLastActiveWindow(); | |
m_plugin->hideOwnWindow(); | |
#else | |
- if (getMainWindow()) { | |
+ if (getMainWindow() && qApp->activeWindow()) { | |
getMainWindow()->minimizeOrHide(); | |
} | |
#endif | |
@@ -441,28 +441,26 @@ void AutoType::performGlobalAutoType(const QList<QSharedPointer<Database>>& dbLi | |
return; | |
} | |
- if (m_windowTitleForGlobal.isEmpty()) { | |
- m_inGlobalAutoTypeDialog.unlock(); | |
- return; | |
- } | |
QList<AutoTypeMatch> matchList; | |
bool hideExpired = config()->get(Config::AutoTypeHideExpiredEntry).toBool(); | |
- for (const auto& db : dbList) { | |
- const QList<Entry*> dbEntries = db->rootGroup()->entriesRecursive(); | |
- for (auto entry : dbEntries) { | |
- auto group = entry->group(); | |
- if (!group || !group->resolveAutoTypeEnabled() || !entry->autoTypeEnabled()) { | |
- continue; | |
- } | |
+ if (!m_windowTitleForGlobal.isEmpty()) { | |
+ for (const auto& db : dbList) { | |
+ const QList<Entry*> dbEntries = db->rootGroup()->entriesRecursive(); | |
+ for (auto entry : dbEntries) { | |
+ auto group = entry->group(); | |
+ if (!group || !group->resolveAutoTypeEnabled() || !entry->autoTypeEnabled()) { | |
+ continue; | |
+ } | |
- if (hideExpired && entry->isExpired()) { | |
- continue; | |
- } | |
- auto sequences = entry->autoTypeSequences(m_windowTitleForGlobal).toSet(); | |
- for (const auto& sequence : sequences) { | |
- matchList << AutoTypeMatch(entry, sequence); | |
+ if (hideExpired && entry->isExpired()) { | |
+ continue; | |
+ } | |
+ auto sequences = entry->autoTypeSequences(m_windowTitleForGlobal).toSet(); | |
+ for (const auto& sequence : sequences) { | |
+ matchList << AutoTypeMatch(entry, sequence); | |
+ } | |
} | |
} | |
} | |
diff --git a/src/gui/osutils/nixutils/NixUtils.cpp b/src/gui/osutils/nixutils/NixUtils.cpp | |
index eb5ac3b5..80500aa8 100644 | |
--- a/src/gui/osutils/nixutils/NixUtils.cpp | |
+++ b/src/gui/osutils/nixutils/NixUtils.cpp | |
@@ -25,6 +25,7 @@ | |
#include <QDebug> | |
#include <QDir> | |
#include <QPointer> | |
+#include <QProcessEnvironment> | |
#include <QRandomGenerator> | |
#include <QStandardPaths> | |
#include <QStyle> | |
@@ -282,6 +283,11 @@ bool NixUtils::triggerGlobalShortcut(uint keycode, uint modifiers) | |
bool NixUtils::registerGlobalShortcut(const QString& name, Qt::Key key, Qt::KeyboardModifiers modifiers, QString* error) | |
{ | |
#ifdef WITH_XC_X11 | |
+ // If on Wayland, skip registering X11 shortcuts | |
+ if (QProcessEnvironment::systemEnvironment().contains("WAYLAND_DISPLAY")) { | |
+ return true; | |
+ } | |
+ | |
auto keycode = XKeysymToKeycode(dpy, qcharToNativeKeyCode(key)); | |
auto modifierscode = qtToNativeModifiers(modifiers); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment