NSTrackingRect not always working
NSTrackingRect not always working
- Subject: NSTrackingRect not always working
- From: Steve Mills <email@hidden>
- Date: Tue, 30 Jul 2013 14:25:29 -0500
We've found a case where our tracking callbacks no longer get called. A view has a tracking rect installed:
NSTrackingArea* trackingArea = [[NSTrackingArea alloc] initWithRect:localBox options:(NSTrackingInVisibleRect | NSTrackingCursorUpdate | NSTrackingMouseMoved | NSTrackingMouseEnteredAndExited | NSTrackingActiveInKeyWindow) owner:self userInfo:nil];
I then do these steps:
1. Move the mouse into the view with the tracking rect (we'll call this window A).
2. Hit a key that causes a modal dialog to be presented. The dlog only intersects with a portion of window A, so I have to move the mouse over to the dlog. No mouseExited message is sent to window A because it's no longer the key window.
3. Dismiss the dlog and quickly move the mouse back into window A.
When the timing it just right the view gets a cursorUpdate message, but nothing else. From that point, moving the mouse will not generate mouseMoved messages for the view. Only moving the mouse out of the view and back in will then generate mouseExited, mouseEntered, cursorUpdate, and mouseMoved messages in that order.
Has anyone else seen this? Any ideas about solving it? I guess we could remove the tracking rect on windowDidResignKey and reinstall it on windowDidBecomeKey, but I'd rather have the OS work correctly in the first place and not have to hack around this possible bug.
--
Steve Mills
office: 952-818-3871
home: 952-401-6255
cell: 612-803-6157
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden