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

hs.window:raise() focuses raised window when other window for same application is focused #3625

Open
mogenson opened this issue Apr 7, 2024 · 1 comment

Comments

@mogenson
Copy link

mogenson commented Apr 7, 2024

Hello, as described in the documentation [hs.window:raise()](https://www.hammerspoon.org/docs/hs.window.html#raise), "Brings a window to the front of the screen without focussing it".

Unless another window for the same application is focused. Then focus will shift to the raised window.

Example:

  1. window1 is a Finder window and window2 is a Finder window.
  2. Focus window1
  3. window2:raise()
  4. Focus has shifted to window2.

Are there any workarounds for this behavior?

@dmgerman
Copy link

I guess you can write a wrapper function. If the current app is the same as the window you want to raise, save the window, raise the other window, select previous window.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants