Weird Mouse behavior..

Started by Notch, April 14, 2005, 21:24:29

Previous topic - Next topic

Orangy Tang

Quote from: "elias"Could you  be a little more specific as to what the problem is, Orangy? We always use getEventX/Y(), regardless of whether the mouse is grabbed or not, and it seems to work fine.
(I'm away from the code at the moment, so this might be slightly inaccurate, but...)

This Interface class is shared and used in several apps. Some are fullscreen (ie grabbed mouse and GL-drawn cursor) and some are windowed (ie. non-grabbed native). Most of the time (IIRC) it uses getEventX/Y for clicks, and is fine. But dragging uses getDX/DY (for obvious reasons).

Now in .96 getDX has started throwing an exception if I try and call it in non-grabbed mode (why? deltas are still a valid concept in this mode) which messes me up. Equally, your javadoc says that getEventX/Y should only be called in non-grabbed (although this doesn't actually enforce this with an exception, yet...). I now have to have two codepaths depending on whether I'm grabbed or not, where before I could have just one that worked on both.

So basically, I'd like the old behaviour back where I could use either method and not care whether i was grabbed or not.

elias

Ok. That's what I've re-enabled in CVS. Should be in 0.97.

- elias

Orangy Tang

All working again, thanks!