lwouis / alt-tab-macos

Windows alt-tab on macOS
https://alt-tab-macos.netlify.app
GNU General Public License v3.0
10.66k stars 323 forks source link

Finder isn't shown amongst running apps after initial installation #3350

Open Stokestack opened 4 months ago

Stokestack commented 4 months ago

Describe the bug

Finder is not blacklisted, and I don't have "Hide apps with no open window" checked. But immediately after installing Alt-Tab (and restarting it after granting permissions), it did not show Finder among running applications.

So I created a Finder window, and then checked Alt-Tab; it was shown. I then closed the Finder window, and checked Alt-Tab; now a large Finder icon appeared at the end of the open-apps grid.

Steps to reproduce the bug

Do a fresh installation of Alt-Tab and grant all permissions. Make sure Finder isn't blacklisted in Alt-Tab preferences. Make sure Alt-Tab isn't hiding apps with no windows. Make sure Finder has no windows. Invoke Alt-Tab.

Your environment

lwouis commented 4 months ago

Hi,

On a fresh install, Finder is blacklisted partially. Only windows are shown, not the app itself in the case where there is no open window. This is what it looks like:

image

When you say that Finder is not blacklisted, do you mean that you removed the row from the blacklist table?

Thank you 🙇

Stokestack commented 4 months ago

Sure! First I set the drop-down to the blank entry. This didn't do anything. Then I removed the row altogether.

On a side note: I think it would be better not to hide Finder by default. Doing so hides one of Alt-Tab's coolest features: creating a window if you tab to an app that lacks one.

lwouis commented 4 months ago

Could you please share a video of the issue? Showing the preferences and the behavior?

Thank you

Stokestack commented 4 months ago

Well, it only occurred on initial installation. How do I fully remove AltTab and all of its preferences?

lwouis commented 4 months ago

There is a button for that in the preferences. At the bottom, on this tab:

image
Stokestack commented 4 months ago

OK, deleting preferences did reproduce the problem. In fact, now it doesn't show Finder even when it has a window. Screen grab and shot of preferences attached.

https://github.com/lwouis/alt-tab-macos/assets/196304/a00d48c1-d9e7-47cb-b120-afb0ed0fcb52

Screenshot 2024-05-13 at 12 34 41 PM

lwouis commented 4 months ago

Could you please show the Blacklist tab? Also, if you press command+tab, the default app-switcher shows the Finder icon, right?

Thank you

Stokestack commented 4 months ago

Right, I forgot that Finder was blacklisted by default (which I don't understand; it defeats one of the best features of Alt-Tab).

After resetting preferences and removing Finder from the blacklist, it still doesn't show up in Alt-Tab at first. You have to create a Finder window and then invoke Alt-Tab. After that, Finder will show up without a window. Here's a screen grab of the sequence.

ShaiAvr commented 1 month ago

I am also having this issue. When alt-tab starts, if there are no finder windows, then finder doesn't show at all, despite removing it from the black list and disabling "hide apps without windows". Only after opening a finder window and closing it, the finder app is shown in alt-tab as expected. It's really annoying since I am used to finder always being available in the apps list of Cmd+Tab.

I also agree with @Stokestack that it shouldn't be blacklisted (even partially) by default. In addition to being able to create a new window when tabbing to an app without a window (which I admit is cool since if you tab into an app without a window, you were probably going to make a new window so it's a nice shortcut), most Mac users like me are used to having finder always available in the apps list and while I can understand why some people don't like it, I think MacOS standard behavior should be followed by default.

Another point I should mention is that for me, this issue is totally reproducible. Just start alt-tab without having any finder windows open, and you won't see the finder app icon at all. Opening a finder window fixes this and makes the finder app available even without any windows open.

lwouis commented 1 month ago

Hi,

I was able to reproduce the issue. After investigating, I think it must be due to a change in macOS, at some point in the new releases.

The reason AltTab is not showing the Finder is that it detects that Finder has 1 open window. However, that window is bogus, and is later filtered. So we see neither the window nor the app-with-no-open-window.

image

It's a logic bug in our code technically. It hasn't happened before with other apps because it only happens if the window has no CGWindowID. Windows should always have an ID. Except in that case, for some reason, the OS API doesn't return, so we have nil.

I've made a fix for this. It will be shipped in the next release 👍

Thank you 🙇