Hi all,

Following up on a problem I was having a week or so back with receiving 
multiple mouse-ups in an event loop, I've narrowed the problem down to the 
events coming from a trackpad instead of a mouse.

Here's an odd thing:

        NSUInteger      mask = NSLeftMouseDownMask | NSLeftMouseUpMask | 
NSLeftMouseDraggedMask | NSMouseMovedMask | NSScrollWheelMask | NSKeyDownMask;
        while( loop )
        {
                theEvent = [NSApp nextEventMatchingMask:mask untilDate:[NSDate 
distantFuture] inMode:NSEventTrackingRunLoopMode dequeue:YES];


This is the fragment of code that sets up the mask and grabs the event. I 
should only get those events that match the mask, right? With a mouse, I do, 
but with a trackpad I'm also getting right mouse down, right mouse dragged and 
right mouse up returned. Is that expected? It seems incorrect.

I'm not sure it has a bearing on my bug because I do ignore those events, but 
OTOH, the bug is only manifest using the trackpad. (Debugging this in the 
debugger is impossible due to the dynamic nature of the loop, so I'm having to 
try and log output at key points).

--Graham


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to