[Xquartz-dev] Not autoswitching X11 -> Aqua -> X11

Jeremy Huddleston jeremyhu at apple.com
Tue Aug 25 10:03:47 PDT 2009


On Aug 25, 2009, at 08:01, Eeri Kask wrote:
> At first sight it seemed this phenomenon happens about once per
> hour, a longer observation revealed it happens at the same time
> *exactly* once per hour, the time-point probably depending on the
> moment the machine is started.

It seems to happen when an application marked LSUIElement is  
launched.  This should have no effect on the focused application, but  
it seems to be what triggers this momentary focus loss.

The bug report for this issue is here:
http://xquartz.macosforge.org/trac/ticket/58


> As it seemed like a "cron"-daemon-like problem I purposefully
> started shutting down system processes as much as I could, please
> find attached the minimal process list I ended up after booting into
> running a usable computing environment which still includes a
> configuration showing this X11->Aqua->X11 phenomenon.  (Being new to
> MacOS, not knowing any better I had to scramble Finder, Dock,
> Spotlight, etc *.app/ directories to keep them all off while booting
> ... I am very grateful to any hint how to accomplish this by some
> less-intrusive method, e.g. some appropriate launchd-setting or
> whatever is the intended method for that.)

Note that this doesn't work under SL, but here's what you want to do  
for Leo:
sudo launchctl unload -w /System/Library/LaunchDaemon/_____.plist
sudo launchctl unload -w /System/Library/LaunchAgent/_____.plist

> Looking at this process list there seem not very many candidates
> hiding the problem,

It's probably not something already running.  It's likely something  
starting that causes the problem.

> and simply shooting off "UserEventAgent" I
> finally could reproduce this screen-switching phenomenon willfully.
> It appears this service is automatically started anew and during
> this time I always observed the screen-switching.  So it appears in
> my case the problem is in
>
>    /System/Library/UserEventPlugins/iCalAlarmAgent.plugin/
>
> as having wiped away this directory these X11->Aqua->X11 unintended
> switches instantly stopped, and having closely observed the
> X11-behaviour for few days now since then I can confidently confirm
> this phenomenon is gone.
>
> Here I have to stop and humbly ask anybody with access to the
> appropriate source code to take a further look at the issue, I am
> willing to assist with experimenting by running code should this
> turn out helpful. :-)

The bug is already filed internally.  I'll attach your information to  
both the Apple and XQuartz reports.

Thanks,
Jeremy




More information about the Xquartz-dev mailing list