Revision: 3826
          http://skim-app.svn.sourceforge.net/skim-app/?rev=3826&view=rev
Author:   hofman
Date:     2008-04-28 14:24:35 -0700 (Mon, 28 Apr 2008)

Log Message:
-----------
Only show hover window when the app is active.

Modified Paths:
--------------
    trunk/SKMainWindowController.m
    trunk/SKPDFView.m

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2008-04-28 11:29:39 UTC (rev 3825)
+++ trunk/SKMainWindowController.m      2008-04-28 21:24:35 UTC (rev 3826)
@@ -3275,6 +3275,7 @@
 }
 
 - (void)showHoverWindowForDestination:(PDFDestination *)dest {
+    if ([NSApp isActive]) { 
         PDFAnnotationLink *annotation = [[[PDFAnnotationLink alloc] 
initWithBounds:NSZeroRect] autorelease];
         NSPoint point = [dest point];
         switch ([[dest page] rotation]) {
@@ -3297,6 +3298,7 @@
         }
         [annotation setDestination:[[[PDFDestination alloc] initWithPage:[dest 
page] atPoint:point] autorelease]];
         [[SKPDFHoverWindow sharedHoverWindow] showForAnnotation:annotation 
atPoint:NSZeroPoint];
+    }
 }
 
 #pragma mark Bookmarks

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2008-04-28 11:29:39 UTC (rev 3825)
+++ trunk/SKPDFView.m   2008-04-28 21:24:35 UTC (rev 3826)
@@ -1390,7 +1390,7 @@
     [super mouseEntered:theEvent];
     if (trackingNumber == trackingRect) {
         [[self window] setAcceptsMouseMovedEvents:YES];
-    } else if (-1 != CFArrayGetFirstIndexOfValue(hoverRects, CFRangeMake(0, 
CFArrayGetCount(hoverRects)), (void *)trackingNumber)) {
+    } else if ([NSApp isActive] && -1 != 
CFArrayGetFirstIndexOfValue(hoverRects, CFRangeMake(0, 
CFArrayGetCount(hoverRects)), (void *)trackingNumber)) {
         [[SKPDFHoverWindow sharedHoverWindow] showForAnnotation:(id)[theEvent 
userData] atPoint:NSZeroPoint];
         hoverRect = trackingNumber;
     }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to