Revision: 5056
http://skim-app.svn.sourceforge.net/skim-app/?rev=5056&view=rev
Author: hofman
Date: 2008-12-13 18:41:35 +0000 (Sat, 13 Dec 2008)
Log Message:
-----------
fix tracking rect for side windows
Modified Paths:
--------------
trunk/SKSideWindow.m
Modified: trunk/SKSideWindow.m
===================================================================
--- trunk/SKSideWindow.m 2008-12-13 12:27:01 UTC (rev 5055)
+++ trunk/SKSideWindow.m 2008-12-13 18:41:35 UTC (rev 5056)
@@ -303,49 +303,33 @@
- (void)setFrame:(NSRect)frame {
[super setFrame:frame];
- if (resizing)
- return;
- if ([self window] && trackingRect)
- [self removeTrackingRect:trackingRect];
- trackingRect = [self addTrackingRect:[self bounds] owner:self
userData:NULL assumeInside:NO];
+ [self trackMouseOvers];
}
- (void)setFrameSize:(NSSize)size {
[super setFrameSize:size];
- if (resizing)
- return;
- if ([self window] && trackingRect)
- [self removeTrackingRect:trackingRect];
- trackingRect = [self addTrackingRect:[self bounds] owner:self
userData:NULL assumeInside:NO];
+ [self trackMouseOvers];
}
- (void)setBounds:(NSRect)bounds {
[super setBounds:bounds];
- if (resizing)
- return;
- if ([self window] && trackingRect)
- [self removeTrackingRect:trackingRect];
- trackingRect = [self addTrackingRect:[self bounds] owner:self
userData:NULL assumeInside:NO];
+ [self trackMouseOvers];
}
- (void)setBoundsSize:(NSSize)size {
[super setBoundsSize:size];
- if (resizing)
- return;
- if ([self window] && trackingRect)
- [self removeTrackingRect:trackingRect];
- trackingRect = [self addTrackingRect:[self bounds] owner:self
userData:NULL assumeInside:NO];
+ [self trackMouseOvers];
}
- (void)viewWillMoveToWindow:(NSWindow *)newWindow {
- if ([self window] && trackingRect)
+ if ([self window] && trackingRect) {
[self removeTrackingRect:trackingRect];
+ trackingRect = 0;
+ }
}
- (void)viewDidMoveToWindow {
- if ([self window] && trackingRect)
- [self removeTrackingRect:trackingRect];
- trackingRect = [self addTrackingRect:[self bounds] owner:self
userData:NULL assumeInside:NO];
+ [self trackMouseOvers];
}
- (void)resizeWithEvent:(NSEvent *)theEvent {
@@ -391,8 +375,8 @@
} // end of mouse-tracking loop
[contentView setAutoresizingMask:(edge == NSMaxXEdge ? NSViewMaxXMargin :
NSViewMinXMargin) | NSViewHeightSizable];
- [self trackMouseOvers];
resizing = NO;
+ [self trackMouseOvers];
}
- (void)mouseDown:(NSEvent *)theEvent {
@@ -415,9 +399,11 @@
}
- (void)trackMouseOvers {
- if ([self window] && trackingRect)
- [self removeTrackingRect:trackingRect];
- trackingRect = [self addTrackingRect:[self bounds] owner:self
userData:NULL assumeInside:NO];
+ if ([self window] && resizing == NO) {
+ if (trackingRect)
+ [self removeTrackingRect:trackingRect];
+ trackingRect = [self addTrackingRect:[self bounds] owner:self
userData:NULL assumeInside:NSMouseInRect([self convertPoint:[[self window]
mouseLocationOutsideOfEventStream] fromView:nil], [self bounds], [self
isFlipped])];
+ }
}
- (void)mouseExited:(NSEvent *)theEvent {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit