[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Draw widget mouse position error - follow up



Oliver Smith wrote:
> Apologies for anyone who's already seen this follow up, it didn't propagate
> as far as deja and I only received one e-mail reply so here goes again....
> 
> Finally a reply from RSI regarding this problem:
> 
> "After speaking to the developers at great length on this topic, they are
> adamant that they doubt this has anything to do with IDL. The X and Y cursor
> values are simply passed to IDL by the system, so any changes between mouse
> clicks are outside of IDL's control. Therefore, if Linux is working
> correctly, it is due to the operating system producing the fault and not
> IDL."
> 
> So is this an NT bug, can anyone reproduce this error under NT, but not
> using IDL?
> 
> Regards,
> 
> Oliver
> 
> ***************************************************************************
> 
> Original post:
> 
> Hi,
> 
> I use a draw widget with motion events turned on, I've noticed that a double
> click event has a different y-position to a single click event. This is
> demonstrable by the code at the bottom of this message. For a double click,
> the events returned give:
>                                         X        Y
> Cursor position =      187    110
> Cursor position =      187    110
> Cursor position =      187    111
> Cursor position =      187    110
> 
> It is easy to work around the problem by detecting the double click
> (event.clicks = 2) and subtracting 1 from event.y
> 
> I can recreate the problem on another computer of almost identical
> specification to my own. I am using IDL 5.3.1 on NT 4. Can anybody recreate
> this bug and on what platforms?
> 
> Regards,
> 
> Oliver Smith
> 
> PRO DRAW_EVENT, event
> Print, 'Cursor position = ', Event.x, Event.y
> END
> 
> PRO ojs
> 
> base = Widget_Base(UNAME = 'WID_BASE', SCR_XSIZE=300 ,SCR_YSIZE=200) draw =
> Widget_Draw(Base, UNAME = 'WID_DRAW',SCR_XSIZE = 300, SCR_YSIZE = 200,
> /BUTTON_EVENTS, EVENT_PRO = 'DRAW_EVENT')
> 
> Widget_Control, /REALIZE, base
> Xmanager, 'WID_BASE', base, /NO_BLOCK
> 
> END

I ran your code in IDL 5.3 on a PC running Windows NT 4 SP6, and I saw
the same problem with both single clicks and double clicks.

I have a Kensington trackball on a flat hard surface, so the cursos does
not move unless the ball moves. I started up PaintShop Pro 6, which
tracks the cursos x/y location when you load an image. After positioning
the cursor, and tapping dozens of single-clicks and double-clicks, I
could not get the displayed cursor x/y location to move at all.

Cheers,
Liam.
http://cimss.ssec.wisc.edu/~gumley