i386 v6.3 MacOSX: cursor.pro not responding to mouse button events [message #54883] |
Sun, 15 July 2007 18:01  |
Tom Berger
Messages: 2 Registered: March 2006
|
Junior Member |
|
|
I'm trying to use a direct graphics routine from the astronomy library
called curval.pro on a Mac i386 laptop. The mouse is a three-button
mouse that is functioning fine outside of IDL (i.e. left button is
primary, right button is secondary, scroll wheel is button 3, etc.).
In curval, there is no response to mouse button events.
Here's the code fragment that should update !MOUSE from the cursor.pro
built-in:
LOOP: sv_err = !MOUSE.BUTTON
!MOUSE.BUTTON = 0
cursor,x,y,2,/DEVICE,/CHANGE
cr_err = !MOUSE.BUTTON
if cr_err EQ 4 then begin
print,' '
if fileflag then free_lun,lun
return
endif
The rest of the routine prints out x and y as the mouse is moved
across the window. This works correctly but there's no way to quit out
of the loop since !MOUSE.BUTTON=4 is the exit condition. I have to
Control-C to crash curval and then retall to get back - not a very
elegant solution...
Nothing in my .Xdefaults file would seem to be messing with mouse
functionality in X-windows. The only relevant entry might be a
"*keyboardFocusPolicy: pointer" statement, but this is also in my PPC
machine version that works correctly.
Any suggestions?
Thanks,
Tom
|
|
|
Re: i386 v6.3 MacOSX: cursor.pro not responding to mouse button even [message #54957 is a reply to message #54883] |
Mon, 23 July 2007 11:56  |
rclark
Messages: 12 Registered: September 1992
|
Junior Member |
|
|
Recently sebinjapan <smasson@lodyc.jussieu.fr> wrote:
> see
> http://www.dfanning.com/misc_tips/remotecursor.html
>
Yes, the lost clicks.
I use a linux workstation and have encountered a problem very similar
to that described in this article.
Using direct graphics, select a rectangular area of interest on the
image... (sounds like everyone has written it at one time or
another)... wrote it for solaris years ago, still works fine. But it
wouldn't work on my linux system. But it also worked fine on other
linux systems around here. Only problems were for *my* system! Other
mousey clickey type stuff on my system worked just fine too. Only IDL
was having a problem. (Still don't know why the problem was limited to
IDL).
Our systems use pc type mice. The wheel does double duty, giving both
the windows type wheel function and the unix third button. Have to be
very careful the finger doesn't slip with this setup!
Anyway, there was no response for pressing any of the 3 buttons.
Except occasionally there was a response for button 2-- the wheel. You
guessed it, the button presses were being swallowed up somewhere but
CURSOR was receiving the signal for the wheel when my finger slipped!
I never figured out the exact cause for this, though I suspect it was
caused when I had modified my KDE desktop settings for WINDOW BEHAVIOR
and 'PREVENT FOCUS STEALING' (or something like that) because of some
problems with another application.
The folks at RSI didn't have any useful suggestions. Nobody around
here in the department really knows much about X11/Motif programming
or setup. Web searches didn't turn up anything. The fix that finally
got it was the rather draconian aproach of recreating a totally new
desktop from scratch:-(
Well, I had explicitly included 'linux' in my searches so I didn't
come across David's Mac article till later. That's when the light went
off and I connected my problem with FOCUS STEALING setting. Although
I've never actually verified that that was it. It's not really a
problem I'm anxious to reproduce.
Maybe David can add a footnote to his article about the Mac mouse
problem that it can also occur with linux.
Richard Clark
|
|
|
|