sbmpost / AutoRaise

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

Not working with kitty terminal app #177

Closed tariq-cigna closed 8 months ago

tariq-cigna commented 9 months ago

AutoRaise does not seem to work with the kitty terminal app: https://github.com/kovidgoyal/kitty

I have tried compiling with the following make options:

make CXXFLAGS="-DEXPERIMENTAL_FOCUS_FIRST"
make CXXFLAGS="-DOLD_ACTIVATION_METHOD -DEXPERIMENTAL_FOCUS_FIRST"
make CXXFLAGS="-DOLD_ACTIVATION_METHOD"

None of the cases worked with this invocation:

AutoRaise.app/Contents/MacOS/AutoRaise -delay 0 -focusDelay 1 -verbose true

or this one either

AutoRaise.app/Contents/MacOS/AutoRaise -delay 1 -focusDelay 1 -verbose true

They all produced this output with verbose logging on when entering the kitty window:

2024-01-17 21:34:37.066 AutoRaise[7574:3314052] Fallback
2024-01-17 21:34:37.066 AutoRaise[7574:3314052] No raisable window
2024-01-17 21:34:37.121 AutoRaise[7574:3314052] Fallback
2024-01-17 21:34:37.123 AutoRaise[7574:3314052] No raisable window
sbmpost commented 9 months ago

@tariq-cigna I tried compiling kitty, which turned out to be almost impossible. Maybe I am using the wrong python version. If there is a precompiled binary or something like that? This would make debugging easier. That being said, I see that kitty is still very much in development and would suspect the issue to be there. But I can't be sure of course. Quickly going over the issues/commits, I noticed this: https://github.com/kovidgoyal/kitty/pull/7011. Could it be related?

tariq-cigna commented 9 months ago

Thanks for looking into this!

There is a homebrew cask, brew install kitty should get you the latest release build. Otherwise, alternate binary installation notes are here: https://sw.kovidgoyal.net/kitty/binary/#binary-install

I noticed this: https://github.com/kovidgoyal/kitty/pull/7011. Could it be related?

I'm not 100% sure, but believe this is related to the kitty application's hotkeys to grab focus on it's own windows through the OS window manager.

sbmpost commented 9 months ago

@tariq-cigna

Thanks for providing me with options for a binary. I will have a look asap. Thanks for reporting :-)

sbmpost commented 8 months ago

@tariq-cigna

So I installed kitty v0.30.0 with brew. When I hover the kitty terminal window, if focuses properly. Could this have been fixed by the kitty developers then?

tariq-cigna commented 8 months ago

@sbmpost oh, interesting. I had 0.31 installed and it didn't focus. I upgraded with homebrew to the latest, 0.32.1, and now it's focusing. Thanks for looking into this. I will close this issue.