Open/Close The Hidden Shelf Menu


IDL and Mouse Cursor problems on OS X

March 23rd, 2007 by Marcos

If you have any issues getting IDL to properly record/recognize the cursor position or mouse clicks, you may want to try this command in the terminal

 defaults write com.apple.x11 wm_click_through -bool true 

Frank Varosi here at UF gave me this tip, which he found at this french site. What this command does is it changes a window manager preference in Apple’s X11. This probably only effects the so-called “Quartz VM” which is the default window manager. If you switched to the enlightenment or some other window manager, my guess is this click-through preference has no effect, but I can’t say for sure.

Personally, I’ve yet to write IDL programs that look for the cursor location, but I figure this may be helpful to others.

Update As a commenter noted, you will have to restart X11 for this to do anything, since it’s changing a preference in Apple’s quartz-vm window manager.

Update II As commenter Josh Shiode noted, the Macosforge X11 (and possibly any X11 with Leopard) requires a slightly different command:

        defaults write org.x.x11 wmclickthrough -bool true

Related posts

Tags: , , , — .
Google
 

14 Responses to “IDL and Mouse Cursor problems on OS X”

  1. 1

    N. Ingle Says

    Many thanks for this posting this tip. I am trying to keep a set of IDL code written on PC’s runable on a Mac, and I thought I had been beaten on this particualr problem!

  2. 2

    A. Steffen Says

    Note: You must restart X11 for this change to take effect.

  3. 3

    S. Meibom Says

    Many thanks, a very useful tip and exercise in French comprehension. I can think of one German whose code has been saved by this information.

  4. 4

    G. McSwain Says

    Thanks, my own code was saved by this tip!

  5. 5

    A. Weinberger Says

    Thanks, that solved three problems at once: getting the wrong cursor coordinates with a cursor command (in idlde), having the cursor command hang (in plain idl), and having to click back in the idlde window to have the wrong cursor position registered.

  6. 6

    Christopher Bonnett Says

    I applied the command, and now it will register left click and right click, but i won’t register middle click, anybody have any ideas? I’m on leopard and using idl 7.0….

    Christopher

  7. 7

    Marcos Says

    Leopard might the problem; you may want to look at the various posts on here about X11, and try some of the newer unofficial X11 builds on macosxforge…

  8. 8

    Paul Levine Says

    Just wanted to chime in with another “thanks a low” for posting this, it saved my rear

  9. 9

    Paul Levine Says

    Whoops, I meant “thanks a lot” not “low”

  10. 10

    Josh Shiode Says

    If you upgraded x11 through macosforge (which is recommended by most forums I have come across), I found that the above tip does not work. For reference, I am running IDL 6.4 (with the 6.4.1 patch) and the latest x11 release (2.2.0.1) on OS X 10.5.2.

    The relevant command is almost identical except that the defaults file (Mac calls it a domain) you will need to change is ‘org.x.x11′ So the command would be:

    defaults write org.x.x11 wmclickthrough -bool true

    I found that I actually had to delete the “wmclickthrough” key using the command:

    defaults delete org.x.x11 wmclickthrough

    And then add it back using the first command, but I suspect that problem was just my own user error somewhere. Hope this helps others not waste the 2 hours I just wasted…

  11. 11

    Josh Shiode Says

    Sorry, formatted that wrong. I mean the keyword in the article, not what showed up with the italics…

  12. 12

    Torsten Says

    I tried the different solutions on my PPC G5: - Leopard 10.5.2 - Xquartz 2.2.1 - (xorg-server 1.3.0-apple20) - IDL 7.0

    there is NO way to make cursor work! Any help??

    Thank’s Torsten

  13. 13

    Torsten Says

    sorry, if I write the keyword wmclickthrough instead wmclickthrough it works…my mistake…

    Thank’s Torsten

  14. 14

    Torsten Says

    again: it must be underscore - click - underscore…!!!

Leave a Response



Close
E-mail It