sbmpost / AutoRaise

AutoRaise (and focus) a window when hovering over it with the mouse
GNU General Public License v3.0
1.42k stars 60 forks source link

Sonoma: Finder windows flickering #170

Closed tkunze closed 10 months ago

tkunze commented 10 months ago

In Sonoma, when I move the mouse across the desktop, any Finder windows flicker like crazy. Any ideas what I can do to prevent this?

Config is:

delay=0
focusDelay=1
warpX=0.5
warpY=0.5
scale=1.0
mouseStop=true

Movie:

https://github.com/sbmpost/AutoRaise/assets/239703/29a6992c-81ba-49db-8b6c-e0288bca41fd

sbmpost commented 10 months ago

@tkunze

I can't reproduce the behavior you are seeing. Are you running the latest AutoRaise version? There have been some fixes for Sonoma and Finder in particular. There is also a GUI version (dmg) which you may find useful for quickly adjusting settings.

tkunze commented 10 months ago

I was using the newest homebrew version, 4.6. ran another brew upgrade autoraise today, just to be sure.

When I run /usr/local/bin/autoraise -delay 1 -focusDelay 1, no flicker. When I run /usr/local/bin/autoraise -delay 0 -focusDelay 1, flickering. (Setting focusDelay higher slows down the flickering.)

Same with the AutoRaise.app (4.6.0). As soon as I set the "Delay" slider to 0 (left-most setting), windows flicker.

tkunze commented 10 months ago

Update: created a new, vanilla user account and it works as advertised. Any idea what I could look for that's causing the flickering behavior in my user account?

tkunze commented 10 months ago

Update 2: If I disable System Settings > Desktop & Dock > Show Items > On Desktop then there is no flickering. See screen below.

Screenshot 2023-11-07 at 12 12 17

tkunze commented 10 months ago

Update 3: If I click on the Desktop (triggers Expose in Sonoma now), then click again (to exit Expose), then there is no flickering. I can then mouse over as many other app windows as I like for as long as I like and open Finder windows do not flicker.

However, as soon as I either (a) mouse over a Finder window or (b) switch to a different Space, and then again over the desktop, the flickering is back.

Clicking on the desktop (thus "de-selecting" any open Finder windows) thus temporarily fixes the issue. It does not fix #169.

tkunze commented 10 months ago

Update 4: As with the option mentioned in Update 2, this issue also seems to be perfectly correlated to whether the menubar is set to hide or not, see screen below. If the menubar is set to hide "Always", finder windows flicker, if not, they don't flicker.

Note: Both, setting the menubar to never hide and setting desktop items not to show each also fix #169.

Screenshot 2023-11-07 at 17 02 13

sbmpost commented 10 months ago

@tkunze Lots of updates :-)

Will have a look asap. I think with the detailed information you gave, I should be able to reproduce it. I will let you know.

tkunze commented 10 months ago

Unfortunately this is not quite conclusive yet. While turning these settings off fixes the flickering in my account, turning them on in a vanilla account does not cause flickering…

I'll keep observing/diagnosing this on my end as well.

sbmpost commented 10 months ago

@tkunze

Unfortunately this is not quite conclusive yet.

Indeed on my machine I am unable to reproduce what you are seeing. Speculating, perhaps in some cases, the desktop window (Finder) is seen as a main window. The circumstances under which this would happen are still unclear to me. Perhaps a debug version may help us finding the cause. I can prepare it for you if that is a possibility?

By the way, could it be that you are running additional tools to improve the MacOS GUI experience? Maybe these interact in unforeseen ways with AutoRaise under your account.

tkunze commented 10 months ago

Yes, looking at high-detail logs would be the next step. I already tried command line with -verbose but didn't see anything unusual.

I am not running any additional tools that mess with the window manager or the mouse operation. At least not to my knowledge. I suspect some setting in System Settings.app. I quit the obvious background daemons like Google drive, Dropbox, Keyboard Maestro, etc. before testing.

There is something in my desktop environment that messes things up, it seems.

sbmpost commented 10 months ago

@tkunze good news. I finally managed to reproduce. The conditions are:

In this case the desktop window is seen as a full screen window which in turn means it is treated as a main window. I have pushed the fix and merged with master. Thanks for the detailed reports. I think #169 should also be fixed now.

tkunze commented 10 months ago

Yay! That seems to fix it. Thank you!! AutoRaise is the best.