Make macOS Auto-Type more robust

* Fix #3351

On macOS, entry specific Auto-Type (Cmd+Shift+V) now raises the last active window before lowering the KeePassXC window. This improves accuracy of the window that is actually typed into.
This commit is contained in:
Jonathan White 2019-10-17 21:48:08 -04:00
parent f726d7501f
commit 71085838db

View File

@ -37,6 +37,10 @@
#include "core/Tools.h" #include "core/Tools.h"
#include "gui/MessageBox.h" #include "gui/MessageBox.h"
#ifdef Q_OS_MAC
#include "gui/macutils/MacUtils.h"
#endif
AutoType* AutoType::m_instance = nullptr; AutoType* AutoType::m_instance = nullptr;
AutoType::AutoType(QObject* parent, bool test) AutoType::AutoType(QObject* parent, bool test)
@ -214,6 +218,7 @@ void AutoType::executeAutoTypeActions(const Entry* entry, QWidget* hideWindow, c
if (hideWindow) { if (hideWindow) {
#if defined(Q_OS_MACOS) #if defined(Q_OS_MACOS)
macUtils()->raiseLastActiveWindow();
m_plugin->hideOwnWindow(); m_plugin->hideOwnWindow();
#else #else
hideWindow->showMinimized(); hideWindow->showMinimized();