10.4: Bring X11 windows forward via AppleScript

Jul 22, '05 09:50:00AM

Contributed by: dkulp

Tiger only hintX11 windows do not raise (come to the front) when the application is activated. This is a well-known bug in Tiger and the current X11 release. If you switch apps with the Dock, then you must click the X11 icon twice -- once to activate and once to bring the windows forward. If you switch apps (like I do) using Command-Tab, then you must Command-Tab to X11 a second time, e.g. with the key sequence Command-(Tab,Shift-Tab).

One workaround is to bind a new key to an AppleScript that activates X11. There are many ways to do this, but one way is to use Butler.

  1. Using Script Editor, create a one-line applescript that says:
    tell application "X11" to activate
    
  2. Find your script in the Finder and drag it onto Butler's configuration.

  3. Select it in Butler and add a hot key, e.g. Option-Tab.

  4. Change "Open With Default" to "Execute Applescript."
So now I switch to X11 by typing Option-Tab, and cycle through my other apps with Command-Tab. A simple hint to solve an annoying problem until Apple releases a patch.

Comments (8)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20050714011418999