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

"separation" of tracking between browsers tab #89

Closed GlibMartynenko closed 1 year ago

GlibMartynenko commented 2 years ago

Hi, Firstly thank you SO MUCH for all your efforts guys!!!

I have one question. As for now, when I have two monitors and I've opened Chrome. On monitor 1 - I have opened the Chrome tab On monitor 2 - I have opened the Chrome tab. What if I want to keep the focus on motor 1 and on motor 2 I will open VS Code? In that case, once I switched back to monitor 1 (with Chrome) on motor 2 another Chrome tabs automatically popped up and VS code disappeared.

So, is it possible to have a "separation" of tracking between browsers tab?

sbmpost commented 2 years ago

@GlibMartynenko

Before going into the details, can you tell me which AutoRaise version you are running and which compile options / settings are in effect? This will help to reproduce what you are describing.

GlibMartynenko commented 2 years ago

in AutoRaise.mm file I see that version is 3.2 AUTORAISE_VERSION "3.2"

sbmpost commented 2 years ago

@GlibMartynenko AutoRaise tells Chrome to raise. Then, for whatever reason, sometimes Chrome decides to raise all of its windows. This behaviour can be circumvented if you specify -delay 0. This only works if you have the EXPERIMENTAL_FOCUS_FIRST compile time flag enabled. The README describes how to compile yourself a version that does. Note that by specifying a delay setting equal to 0, AutoRaise doesn't actually raise the window any longer but only moves the keyboard focus to it. Also note that this feature relies on undocumented Apple API calls, so it may break with future OSX releases. Nevertheless I am curious if this workaround is working for you.

sbmpost commented 2 years ago

@GlibMartynenko Testing some more, it seems that while moving the mouse between monitors, AutoRaise sometimes fails to raise chrome within time, and thus tries again. The second time it tries, things get messed up. The problem can be mitigated by specifying a delay of 2 instead of using the default. I am not sure if this is fixable, but I will have a look when I have some more time on my hands. Until then, the mitigation solution described here (-delay 2) or the workaround described above will have to do.

sbmpost commented 2 years ago

@GlibMartynenko A UI version has been released with many improvements. I am not sure if it will solve your problem, but it might be worth a shot, see: https://github.com/sbmpost/AutoRaise/blob/master/AutoRaise.dmg