Open eraserhd opened 3 years ago
This appears to be a more general issue, actually. I've just found that, in my new config, focusWindow()
will focus the wrong window from the right app. If I try to focus a window from an app that has windows on both screens, and the app's front-most window is on the wrong monitor, it will focus the frontmost window (which is on the wrong monitor).
I have "Displays have separate Spaces" on, if that matters.
This terrible-looking work-around works:
window:focus()
if hs.window.focusedWindow() ~= window then
window:focus()
end
I'm still seeing this with 0.9.100.
@eraserhd can't seem to grasp how to use your work-around. The code seems to re-focus the window I wanted to focus away from, and indeed that's what I see when I use it.
On 0.9.81 (5594).
I have windows, from west to east:
If I call
focusWindowWest()
on Kitty B, Chrome A is sometimes focused. In fact, testing just now, it always focuses the topmost Chrome window, regardless of where it is, so it is somehow focusing the correct app and the wrong window.I'm calling this function with
'West'
: