Xquartz 2.8.5: Focus on new windows not working reliably
After upgrading to Sonoma, I've noticed that launching X applications no longer brings focus to it. I see there is "Focus on new windows" setting, which I tried disabling and enabling again, but that didn't help. I did notice for a while that it was working, but soon again it stopped working.
Simple steps to reproduce:
- Start Terminal
- Type xterm
- type some text
- Notice that text goes to Terminal, not xterm
Related to #328 or #363 or #293 ?
There are some security changes in macOS Sonoma related to switching focus of the active window. XQuartz might need to adapt.
I'm also seeing this, one of those things I couldn't put my finger on until now. Another - this is just fyi, since I don't think I have enough understanding of the mechanics of the code to offer a bug report - is that running Emacs client (Linux 26.1, 27.1, 27.2) over X11 to XQuartz server does strange things to frame (window) size. Thanks to the team for this project!
I was trying to run xterm -e <my_app>.
I am running Sequoia 15.0.1 with XQuartz 2.8.5. After a restart, XQuartz passes the keyboard focus to xterm once, then stops.
My workaround is open -a XQuartz && xterm -e <my_app>.
This seems to work. If you can forsee any horrible side-effects, please let me know.
Also needs Secure Keyboard Entry disabled if you are running from a Mac terminal.
open -a XQuartz && xterm -e
that doesn't work for me. Doesn't get the focus of input fields. Buttons work normal.