Strange tracking rect problem

  • 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
previous month april 2013 next month
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30          
Go to today