mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-01-02 17:20:30 -05:00
Correct macOS window activation from hidden state (#6575)
* Fix #6234 - properly set NSApplication activation policies when the window is hidden and shown
This commit is contained in:
parent
5cfbde0bb7
commit
205ffd30ed
2 changed files with 3 additions and 3 deletions
|
|
@ -203,11 +203,10 @@
|
|||
|
||||
- (void) toggleForegroundApp:(bool) foreground
|
||||
{
|
||||
ProcessSerialNumber psn = {0, kCurrentProcess};
|
||||
if (foreground) {
|
||||
TransformProcessType(&psn, kProcessTransformToForegroundApplication);
|
||||
[NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
|
||||
} else {
|
||||
TransformProcessType(&psn, kProcessTransformToUIElementApplication);
|
||||
[NSApp setActivationPolicy:NSApplicationActivationPolicyProhibited];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ bool MacUtils::raiseWindow(WId pid)
|
|||
|
||||
bool MacUtils::raiseOwnWindow()
|
||||
{
|
||||
m_appkit->toggleForegroundApp(true);
|
||||
return m_appkit->activateProcess(m_appkit->ownProcessId());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue