On Monday March 23 2015 12:00:02 xquartz-dev-request@lists.macosforge.org wrote:
With an xterm window open and focused, simply open the Help menu in XQuartz's menu bar. Since the Search item in that menu has a text field that receives focus, it steals it from the xterm window. When you dismiss the menu, the xterm window does not get focus back. I suspect that the problem with external apps stealing focus is similar.
Something similar happens if you bring up the About XQuartz window and then close it. Or the Preferences window. Etc.
Is that really a valid, representative example? In that case you're generating mouse events yourself that take away focus. I do have my focus set to "follow mouse", btw. That may alleviate any issues for me. R.