alt-tab-macos icon indicating copy to clipboard operation
alt-tab-macos copied to clipboard

Closing the last Preview.app window then alt-tabbing away picks the wrong window

Open d-lord opened this issue 4 months ago • 0 comments

Hi, I love AltTab, thank you for maintaining it! ❤️

Describe the bug

Closing the last Preview.app window and then alt-tabbing away picks the second window in the list, not the first.

This only occurs when Hide apps with no open window is enabled.

Video

https://github.com/user-attachments/assets/f3a112f0-6bf6-4f29-99b1-ff4f08aef4bc

In this video, after closing Preview I'm expecting it to pick the left window, but it picks the right.

Steps to reproduce the bug

  1. Ensure Appearance -> Hide apps with no open window is enabled
  2. Ensure Preview is closed (with ⌘+Q)
  3. Open Finder
  4. Open a Preview file (let's say an image). Preview should appear.
  5. Close the Preview window with ⌘+W. Preview is still focused, but no window is open. (top bar says Preview, the window underneath is not focused)
  6. Hold ⌘ and tap ↹
  7. Observe that the second item in the list is focused, not the first -- this is the bug
  8. Release ↹ to switch to that window. In this example, it's whatever was active before the Finder window we visited.

These act normally though

  • Same but replace steps 2-4 with just "launch a fresh Preview.app with no windows". Then in step 7, the first item will be focused correctly.
  • Same but in step 5, close Preview with ⌘+Q (this doesn't go via AltTab, it just focuses the previous window)

Your environment

  • AltTab version: 6.72.0
  • macOS version: 14.7
  • AltTab's blacklist includes com.apple.finder: Hide in AltTab = When no open window. I think this is the default.

d-lord avatar Oct 01 '24 04:10 d-lord