mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 21:47:39 +00:00
Fix for bug #20861
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25633 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f135451a1a
commit
e384fbd651
2 changed files with 19 additions and 9 deletions
|
@ -1,3 +1,7 @@
|
|||
2007-11-29 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/GSToolTips.m: Fix for #20861
|
||||
|
||||
2007-11-29 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSView.m: Call ([resetCursorRects]) whenever view frame or
|
||||
|
|
|
@ -106,8 +106,9 @@ typedef struct NSView_struct
|
|||
@implementation GSToolTips
|
||||
|
||||
static NSMapTable *viewsMap = 0;
|
||||
static NSTimer *timer;
|
||||
static NSWindow *window;
|
||||
static NSTimer *timer = nil;
|
||||
static GSToolTips *timedObject = nil;
|
||||
static NSWindow *window = nil;
|
||||
static NSSize offset;
|
||||
static BOOL restoreMouseMoved;
|
||||
|
||||
|
@ -201,8 +202,6 @@ static BOOL restoreMouseMoved;
|
|||
- (id) initForView: (NSView*)aView
|
||||
{
|
||||
view = aView;
|
||||
timer = nil;
|
||||
window = nil;
|
||||
toolTipTag = -1;
|
||||
return self;
|
||||
}
|
||||
|
@ -218,6 +217,7 @@ static BOOL restoreMouseMoved;
|
|||
*/
|
||||
[timer invalidate];
|
||||
timer = nil;
|
||||
timedObject = nil;
|
||||
}
|
||||
|
||||
provider = (GSTTProvider*)[theEvent userData];
|
||||
|
@ -235,10 +235,11 @@ static BOOL restoreMouseMoved;
|
|||
}
|
||||
|
||||
timer = [NSTimer scheduledTimerWithTimeInterval: 0.5
|
||||
target: self
|
||||
selector: @selector(_timedOut:)
|
||||
userInfo: toolTipString
|
||||
repeats: YES];
|
||||
target: self
|
||||
selector: @selector(_timedOut:)
|
||||
userInfo: toolTipString
|
||||
repeats: YES];
|
||||
timedObject = self;
|
||||
if ([[view window] acceptsMouseMovedEvents] == YES)
|
||||
{
|
||||
restoreMouseMoved = NO;
|
||||
|
@ -434,13 +435,17 @@ static BOOL restoreMouseMoved;
|
|||
{
|
||||
[NSWindow _setToolTipVisible: nil];
|
||||
}
|
||||
if (timer != nil)
|
||||
/* If there is currently a timer running for this object,
|
||||
* cancel it.
|
||||
*/
|
||||
if (timer != nil && timedObject == self)
|
||||
{
|
||||
if ([timer isValid])
|
||||
{
|
||||
[timer invalidate];
|
||||
}
|
||||
timer = nil;
|
||||
timedObject = nil;
|
||||
}
|
||||
if (window != nil)
|
||||
{
|
||||
|
@ -472,6 +477,7 @@ static BOOL restoreMouseMoved;
|
|||
[timer invalidate];
|
||||
}
|
||||
timer = nil;
|
||||
timedObject = nil;
|
||||
}
|
||||
|
||||
if (window != nil)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue