hs.window:raise() focuses raised window when other window for same application is focused
mogenson opened this issue · comments
Michael Mogenson commented
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:
window1
is a Finder window andwindow2
is a Finder window.- Focus
window1
window2:raise()
- Focus has shifted to
window2
.
Are there any workarounds for this behavior?
dmgerman commented
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.