Issue:
Clicking on an unfocused X11 window (if you have not enabled “focus follows mouse”), or clicking on an X11 window when X11 is in the background, will only focus the X11 window in the case of a left click. However, any additional action implied by a click (e.g., using a middle click to paste text selected in another X11 window – if focus follows mouse is not enabled – or selected and copied in a non-X11 window) will not be performed and the click will not activate the window.
Solution:
Issue the following command in an xterm (X11) window and then restart X11:
Starting with Leopard 10.5.5 (which upgraded X11 to 2.1.5), this is changed to: defaults write org.x.X11 wm_click_through -bool true
This feature allows the action implied by the click to be passed through to the application. Repeat with true replaced by false to turn it off. The file modified by defaults in this case is ~/Library/Preferences/org.x.X11.plist.
Note that starting with Snow Leopard (and, with a little extra work, Leopard) this configuration can also be accomplished from the X11 application Preferences menu – see Copy and paste between X11 and OS X. Note that focusing or activation of the X11 window will only happen if the click would normally have focused or activated the window. For example, a left-click (or equivalent) will normally activate an X11 xterm window, whereas a middle click (or equivalent) will not. However, with click-through enabled, a middle click on an unfocused or backgrounded (i.e., inactive) X11 xterm window will perform the expected action of pasting whatever is in the copy buffer into the xterm window, but will not activate it (i.e., will neither focus the xterm window nor bring X11 to the foreground).
OS Version Compatibility: Lion, Snow Leopard, Leopard, Tiger
Update Status: 25 February 2010
|