Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS: use 'hide' instead of 'minimize' #6053

Open
basbebe opened this issue Feb 2, 2021 · 7 comments
Open

macOS: use 'hide' instead of 'minimize' #6053

basbebe opened this issue Feb 2, 2021 · 7 comments
Assignees
Milestone

Comments

@basbebe
Copy link

basbebe commented Feb 2, 2021

Summary

Instead of 'minimizing' the window after autotype, unlock and open, the application should become 'hidden' on macOS instead of 'minimize.
Otherwise, there should be an option to do so.

Examples

Use 'hide" in the relevant application options or give users an additional option do 'hide' instead of 'minimize'.

Context

On macOS, 'minimize' closes the application window to the dock, but it doesn't change context
That means, althoug the KeePassXC window is gone, the application is still in the foreground / in focus.

Example:

  • KeePassXC is minimized
  • browse with installed browser extension to a login site
  • CTRL-SHIFT-U
  • KeepassXC pops up to become unlocked
  • after unlocking, KeePassXC window is minimized but the application is still in foreground / in focus
  • => the user needs to select the browser window to regain focus.

I think UX-wise it would be more intuitive (at least for me) to have KeePassXC 'hidden' instead of 'minimized'.
By this, the window disappears immediately and focus is back to whatever application was opened before.

@droidmonkey
Copy link
Member

droidmonkey commented Feb 2, 2021

I fixed this in my autotype PR #5864
The previous window is explicitly selected for focus after the autotype action is chosen.

@basbebe
Copy link
Author

basbebe commented Feb 2, 2021

I fixed this in my autotype PR #5864
The previous window is explicitly selected for focus after the autotype action is chosen.

but is this also true for minimizin on startup and after unlock?

@droidmonkey
Copy link
Member

So you actually mean closing the window so that the "instance" does not appear in macos dock? You can enable the system track icon and minimize to tray, that would do what you want. We already hide the window in the dock when minimized.

@droidmonkey
Copy link
Member

This makes more sense to me now: https://apple.stackexchange.com/a/9049

@basbebe
Copy link
Author

basbebe commented Feb 2, 2021

This makes more sense to me now: https://apple.stackexchange.com/a/9049

Yes – I think that makes it more clear than my ramblings.

@phoerious
Copy link
Member

I think exit on close should also be off by default on macOS.

@georgesnow
Copy link

Not having the dock icon appear and re-appear instead of just hiding the window and disbale the dock icon always. Makes for odd behavior and the user is not able to interact like other macOS apps.

I mentioned on the other issue that was previously closed. About using:

NSApplication.ActivationPolicy.accessory

This is an issue because I can't use AppleScript to toggle the window with a keyboard shortcut and force focus on the search box. Using the prohibited method (NSApplicationActivationPolicyProhibited) means the applications "has no windows".

example:

if application "KeePassXC" is not frontmost then
	tell application "System Events" to set visible of application process "KeePassXC" to true
	tell application "KeePassXC" to activate
	tell application "System Events" to keystroke "f" using {command down}
else if application "KeePassXC" is frontmost then
	tell application "System Events" to set visible of application process "KeePassXC" to false
	
end if

you get this error:

System Events got an error: Can’t set application process "KeePassXC" to true.

Since KeePassXC doesnt have hot key option for toggling the window AppleScript (or some sort of Alfred, Keyboard Masetro hacks) are the only option to create the hotkey toggle effect.

@droidmonkey droidmonkey added this to the v2.7.1 milestone Mar 21, 2022
@phoerious phoerious modified the milestones: v2.7.1, v2.7.2 Apr 12, 2022
@phoerious phoerious modified the milestones: v2.7.2, v2.8.0 Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants