-
Notifications
You must be signed in to change notification settings - Fork 0
ui.active_window()
sometimes returns the wrong windows
#502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Correction: haven't tried this on 460 yet, will report back if it still happens there. |
Can you retest on -468? |
Just for clarity, still seeing this on 496, in JetBrains. I've also noticed |
I unfortunately do continue to see this on recent betas, although it's less common than before your ~46x fixes. I'll retest on the newly released 2022.2 though, as that version brings in a large JVM upgrade which I imagine brings in a lot of new Swing behavior. |
I believe I have observed this on mac ventura, in my case with firefox. |
I now observe behavior that I believe to be due to this regularly. It's pretty annoying, a lot of my window management stuff now doesn't work reliably. Mac Ventura, talon 0.3.1-57, multiple apps (firefox, emacs, apple terminal). I'll let you know if I figure out a consistent repro. symptoms possibly due to this:
|
still just firefox? |
No, multiple apps. Firefox, Apple Terminal, Emacs are the ones I think I've seen it on. |
I made a little script that watches for |
Don't check it in the win_focus event, call this wherever you're triggering your window management code. |
The script had way too many false positives so I turned it off a while ago. I think this was because terminal tabs are actually treated as windows somehow? Ugh. Bug is still occurring frequently and very frustrating. I've mostly been mixing keyboard/mouse use with talon use, maybe that has something to do with it. Gonna try instrumenting just the |
Ok, I managed to actually catch an occurrence with the instrumentation on. I'm not sure what triggered it, but once it happened, switching between two different firefox windows on the same virtual desktop by clicking with the mouse did not update |
firefox is kind of bad at accessibility events, talon already has several firefox specific workarounds in place |
I've now observed similar behavior in Emacs. Emacs was focused but Meanwhile, If I switched away from Emacs by clicking on an Apple Terminal window, then re-focused the Emacs window by clicking, the problem persisted. But, there was no problem with the Terminal window focused. Does Talon's ability to determine which window is active depend on that application doing the right thing? That would be a bummer. This all worked quite reliably for me in Linux. |
Is there any hope for this in Firefox? Any time I want to snap a recently focused window I have to first switch to another app and then switch back. |
please retest on latest beta |
The issue with Firefox is indeed fixed, at least for me. Thanks! |
My issues are fixed too and I am joyfully removing a whole bunch of workarounds. Thanks! |
I can confirm:
|
I'm on beta 454, but I've noticed this for a while, most commonly (exclusively?) on JetBrains IDEs. After pushing ctrl-` to rotate windows,
ui.active_window()
will sometimes return the wrong (old), one. I notice this most frequently when using keyboard shortcuts to snap windows.In testing, I noticed
ui.focused_element().AXWindow
does return the right one, so for now I can work around by writing an action that will compare theAXTitle
of those two, and if they differ searching throughui.active_app().windows()
to find the right one.The text was updated successfully, but these errors were encountered: