godbout / WooshyWindowToTheForeground

Alfred Workflow to be used with Wooshy, that brings any macOS windows to the foreground
MIT License
54 stars 0 forks source link

hide already focused Window #4

Closed godbout closed 2 years ago

godbout commented 2 years ago

no point having it in the list.

godbout commented 2 years ago

tried with CG by dropping the first window from the list (they're ordered front to back) but even though the first in the list is the front one, it doesn't mean it's the key window. so it doesn't returned for sure a focused window, just the most front one.

godbout commented 2 years ago

so, ended up doing the same than for the new matching algorithm: get the focused window, do one pass on all the visible windows and match by app, title, bounds. if none is found do second pass with only by app, bounds (coz some apps return different titles with CG and AX APIs). works well.

godbout commented 2 years ago

done in 1.2.0: https://github.com/godbout/WooshyWindowToTheForeground/releases/tag/1.2.0