Skip to content
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

Extremely strange bug - see attached video. #442

Open
AutumnalModding opened this issue Nov 11, 2023 · 2 comments
Open

Extremely strange bug - see attached video. #442

AutumnalModding opened this issue Nov 11, 2023 · 2 comments

Comments

@AutumnalModding
Copy link

I don't even know how to begin describing this.

showcase-2023-11-11_23.35.02.mp4
@jordansissel
Copy link
Owner

What in the world... that's very odd! I had a little chuckle at how weird this one is. Thank you for the video!

I can imagine ways this might happen, but ideally we can find a way to work around this behavior.

I haven't tried to reproduce or test this yet, but my first hypothesis is this: Maybe Firefox is doing something weird which makes keystrokes sent to the app (via --window flag) be processed by the most-recently-focused window? To test this, I think you could try getting to your scenario where key --window $RIGHT F5 incorrectly is handled by the $LEFT window, and then click somewhere in the right window (so it becomes the most recently active before you switch back to your terminal), then try rerunning the same command attempting to send F5 to the right window. Can you report back on what happens? (Same broken behavior where $LEFT receives F5 for some reason? or something else?)

@tauchris
Copy link

tauchris commented Jan 18, 2024

@jordansissel is likely correct in his hypothesis. I know from my own attempts at scripting Firefox browsers that everything (input/CLI commands, etc.) gets intercepted by a single backend firefox process that manages all windows. I've had issues with trying to open new tabs in a browser window from the shell command line -- doing so will always open a tab on the most-recently-focused browser window -- EVEN if that window is on a different desktop! So I strongly suspect Jordan is right about the xdotool key input getting routed to the most-recently-focused firefox window also.

Another case of "premature optimization is the root of all evil"! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants