Our doc windows get a tracking rect (actually, our main view does) for setting 
the cursor:

[[NSTrackingArea alloc] initWithRect:localBox options:(NSTrackingInVisibleRect 
| NSTrackingCursorUpdate | NSTrackingMouseMoved | 
NSTrackingMouseEnteredAndExited | NSTrackingActiveInKeyWindow) owner:self 
userInfo:nil];

If I crash the app with 2 document windows open and relaunch it, the windows 
get restored. But the problem is that *all* document windows will respond to 
mouse tracking, not just the front window which is both main and key. This 
happens if the docs were autosaved (10.4 autosave method) or not. Cycling 
through the windows or manually activating one of them will fix the problem. 
Seems like the NSTrackingActiveInKeyWindow attribute should be preventing this. 
It does prevent it in other cases I've tried, like creating new docs once 
running instead of having them be restored by the OS.

Any ideas? We've also noticed that restoration of docs is kind of a voodoo 
thing, like they get created with hidden windows, then become visible en masse 
or something like that. One of the other engineers has looked at that, so I've 
only heard about it secondhand.

I can just fix it by checking to make sure the view is in the keyWindow, but 
that's what the attribute is for. So it's probably be a bug.

--
Steve Mills
office: 952-818-3871
home: 952-401-6255
cell: 612-803-6157



_______________________________________________

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