Hide window when performing entry auto-type on macOS

* Instead of choosing the last active window, always hide the current window (ie, KeePassXC)
* Fixes #2883
This commit is contained in:
Jonathan White 2019-04-09 21:32:10 -04:00
parent 8bc94874a1
commit 53a57ee8c7
6 changed files with 7 additions and 7 deletions

View File

@ -214,7 +214,7 @@ void AutoType::executeAutoTypeActions(const Entry* entry, QWidget* hideWindow, c
if (hideWindow) {
#if defined(Q_OS_MACOS)
m_plugin->raiseLastActiveWindow();
m_plugin->hideOwnWindow();
#else
hideWindow->showMinimized();
#endif

View File

@ -43,7 +43,7 @@ public:
virtual AutoTypeExecutor* createExecutor() = 0;
#if defined(Q_OS_MACOS)
virtual bool raiseLastActiveWindow() = 0;
virtual bool hideOwnWindow() = 0;
virtual bool raiseOwnWindow() = 0;
#endif

View File

@ -165,9 +165,9 @@ bool AutoTypePlatformMac::raiseWindow(WId pid)
//
// Activate last active window
//
bool AutoTypePlatformMac::raiseLastActiveWindow()
bool AutoTypePlatformMac::hideOwnWindow()
{
return macUtils()->raiseLastActiveWindow();
return macUtils()->hideOwnWindow();
}
//

View File

@ -44,7 +44,7 @@ public:
bool raiseWindow(WId pid) override;
AutoTypeExecutor* createExecutor() override;
bool raiseLastActiveWindow() override;
bool hideOwnWindow() override;
bool raiseOwnWindow() override;
void sendChar(const QChar& ch, bool isKeyDown);

View File

@ -111,7 +111,7 @@ bool AutoTypePlatformTest::raiseWindow(WId window)
}
#if defined(Q_OS_MACOS)
bool AutoTypePlatformTest::raiseLastActiveWindow()
bool AutoTypePlatformTest::hideOwnWindow()
{
return false;
}

View File

@ -44,7 +44,7 @@ public:
AutoTypeExecutor* createExecutor() override;
#if defined(Q_OS_MACOS)
bool raiseLastActiveWindow() override;
bool hideOwnWindow() override;
bool raiseOwnWindow() override;
#endif