Do we need a mouse trap?

Adrian Hey ahey@iee.org
Thu, 04 Mar 1999 11:59:52 +0000 (GMT)


On Thu 04 Mar, Peter Achten wrote:
> >The problem seems to be that I get multiple MouseMove and
> >MouseDrag up calls, even if the mouse state hasn't changed.
> >Is this supposed to happen?

I suppose one of my questions is should ObjectIO issue multiple
(I.E. ~hundreds per second) calls to the mouse function even if the
mouse hasn't moved or clicked or changed state in any way? I can't
see what possible use this is so I would expect ObjectIO not to do it.
If this assumption is correct then my mouse_trap function should be
unnecessary. Hence the question: Do we need mouse traps?
 
> What you didn't write is that it is *vital* to also add the following line
> in the same window attribute list:
> WindowId windowId

Actually, my test program does have this. I didn't list it in my message
because it wasn't something I changed to implement the mouse_trap (but of
course there's no way you or anyone else could have known that, silly me).

I hope you'll excuse me if I disagree with your explanation, because
the one mysterious thing about my mouse_trap is that is _does_ work for
MouseMove, but _not_ MouseDrag. (Although, as I stated above, I don't
think it should be necessary at all).

If nobody else has noticed this problem, and you say that on your Mac the
mouse trap works, I wonder if it could be some wierd bug to associated with
my particular machine or MacOS version. I'm pretty sure thats what it is...
*A BUG* (apologies in advance if I'm wrong!), so its probably worth sorting
it out.

If you would like the full source of my program, together with compiler
options and details of my machine, I'd be happy to send them to you, but
I won't bore the rest of the clean-list subscribers with all that :-)
 
Thanks
-- 
Adrian Hey