Revision: 5517
          http://skim-app.svn.sourceforge.net/skim-app/?rev=5517&view=rev
Author:   hofman
Date:     2009-07-30 17:37:08 +0000 (Thu, 30 Jul 2009)

Log Message:
-----------
perform pdfsync after tracking the mouse

Modified Paths:
--------------
    trunk/SKPDFView.m
    trunk/SKSecondaryPDFView.m
    trunk/SKSnapshotPDFView.m

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2009-07-26 23:50:48 UTC (rev 5516)
+++ trunk/SKPDFView.m   2009-07-30 17:37:08 UTC (rev 5517)
@@ -4179,6 +4179,12 @@
 }
 
 - (void)doPdfsyncWithEvent:(NSEvent *)theEvent {
+    // eat up mouseDragged/mouseUp events, so we won't get their event handlers
+    while (YES) {
+        if ([[[self window] nextEventMatchingMask: NSLeftMouseUpMask | 
NSLeftMouseDraggedMask] type] == NSLeftMouseUp)
+            break;
+    }
+    
     SKPDFDocument *document = (SKPDFDocument *)[[[self window] 
windowController] document];
     
     if ([document respondsToSelector:@selector(synchronizer)]) {
@@ -4192,11 +4198,6 @@
         
         [[document synchronizer] findFileAndLineForLocation:location 
inRect:rect pageBounds:[page boundsForBox:kPDFDisplayBoxMediaBox] 
atPageIndex:pageIndex];
     }
-    // eat up mouseDragged/mouseUp events, so we won't get their event handlers
-    while (YES) {
-        if ([[[self window] nextEventMatchingMask: NSLeftMouseUpMask | 
NSLeftMouseDraggedMask] type] == NSLeftMouseUp)
-            break;
-    }
 }
 
 - (NSCursor *)getCursorForEvent:(NSEvent *)theEvent {

Modified: trunk/SKSecondaryPDFView.m
===================================================================
--- trunk/SKSecondaryPDFView.m  2009-07-26 23:50:48 UTC (rev 5516)
+++ trunk/SKSecondaryPDFView.m  2009-07-30 17:37:08 UTC (rev 5517)
@@ -577,6 +577,12 @@
 
 - (void)mouseDown:(NSEvent *)theEvent{
        if ((NSCommandKeyMask | NSShiftKeyMask) == ([theEvent modifierFlags] & 
(NSCommandKeyMask | NSShiftKeyMask))) {
+        // eat up mouseDragged/mouseUp events, so we won't get their event 
handlers
+        while (YES) {
+            if ([[[self window] nextEventMatchingMask: NSLeftMouseUpMask | 
NSLeftMouseDraggedMask] type] == NSLeftMouseUp)
+                break;
+        }
+        
         SKPDFDocument *document = (SKPDFDocument *)[[[self window] 
windowController] document];
         
         if ([document respondsToSelector:@selector(synchronizer)]) {
@@ -590,11 +596,6 @@
             
             [[document synchronizer] findFileAndLineForLocation:location 
inRect:rect pageBounds:[page boundsForBox:kPDFDisplayBoxMediaBox] 
atPageIndex:pageIndex];
         }
-        // eat up mouseDragged/mouseUp events, so we won't get their event 
handlers
-        while (YES) {
-            if ([[[self window] nextEventMatchingMask: NSLeftMouseUpMask | 
NSLeftMouseDraggedMask] type] == NSLeftMouseUp)
-                break;
-        }
     } else {
         [[NSCursor closedHandCursor] push];
     }

Modified: trunk/SKSnapshotPDFView.m
===================================================================
--- trunk/SKSnapshotPDFView.m   2009-07-26 23:50:48 UTC (rev 5516)
+++ trunk/SKSnapshotPDFView.m   2009-07-30 17:37:08 UTC (rev 5517)
@@ -429,6 +429,12 @@
 
 - (void)mouseDown:(NSEvent *)theEvent{
        if ((NSCommandKeyMask | NSShiftKeyMask) == ([theEvent modifierFlags] & 
(NSCommandKeyMask | NSShiftKeyMask))) {
+        // eat up mouseDragged/mouseUp events, so we won't get their event 
handlers
+        while (YES) {
+            if ([[[self window] nextEventMatchingMask: NSLeftMouseUpMask | 
NSLeftMouseDraggedMask] type] == NSLeftMouseUp)
+                break;
+        }
+        
         SKPDFDocument *document = (SKPDFDocument *)[[[self window] 
windowController] document];
         
         if ([document respondsToSelector:@selector(synchronizer)]) {
@@ -442,11 +448,6 @@
             
             [[document synchronizer] findFileAndLineForLocation:location 
inRect:rect pageBounds:[page boundsForBox:kPDFDisplayBoxMediaBox] 
atPageIndex:pageIndex];
         }
-        // eat up mouseDragged/mouseUp events, so we won't get their event 
handlers
-        while (YES) {
-            if ([[[self window] nextEventMatchingMask: NSLeftMouseUpMask | 
NSLeftMouseDraggedMask] type] == NSLeftMouseUp)
-                break;
-        }
     } else {
         [[NSCursor closedHandCursor] push];
     }


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

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to