Adium

Changeset 24006

Show
Ignore:
Timestamp:
06/16/2008 06:56:43 PM (6 months ago)
Author:
zacw
Message:

Use an instance variable to keep track of whether or not the mouse is inside the tracking rect. This sort of breaks the case where the contact list growing won't display a tooltip under the mouse if it expands to the location the mouse is, but I consider this bug annoying enough to not care so much about that. Fixes #9936.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Frameworks/AIUtilities Framework/Source/AISmoothTooltipTracker.h

    r21727 r24006  
    4444        NSView                                                                          *view;          //View we are tracking tooltips for 
    4545        id<AISmoothTooltipTrackerDelegate>                      delegate;       //Our delegate 
     46         
     47        BOOL                            mouseInside; 
    4648 
    4749        NSPoint                         lastMouseLocation;                              //Last known location of the mouse, used for movement tracking 
  • trunk/Frameworks/AIUtilities Framework/Source/AISmoothTooltipTracker.m

    r23096 r24006  
    129129        if (tooltipTrackingTag == -1) { 
    130130                NSRect                  trackingRect; 
    131                 BOOL                    mouseInside; 
    132                  
     131 
    133132                //Add a new tracking rect 
    134133                trackingRect = [view frame]; 
    135134                trackingRect.origin = NSMakePoint(0,0); 
    136135                 
    137                 mouseInside = NSPointInRect([view convertPoint:[[view window] convertScreenToBase:[NSEvent mouseLocation]] fromView:[[view window] contentView]], 
    138                                                                         trackingRect); 
    139136                tooltipTrackingTag = [view addTrackingRect:trackingRect owner:self userData:nil assumeInside:mouseInside]; 
    140137                 
     
    188185        NSLog(@"+++ [%@: mouseEntered]", self); 
    189186#endif 
     187        mouseInside = YES; 
     188         
    190189        [self _startTrackingMouse]; 
    191190} 
     
    197196        NSLog(@"--- [%@: mouseExited]", self); 
    198197#endif 
     198        mouseInside = NO; 
     199         
    199200        [self _stopTrackingMouse]; 
    200201}