Revision: 4951
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4951&view=rev
Author:   hofman
Date:     2008-11-13 10:33:01 +0000 (Thu, 13 Nov 2008)

Log Message:
-----------
Eat up mouse events after a shift-cmd-click to avoid getting event handler 
messages that are invalid

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

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2008-11-12 23:35:08 UTC (rev 4950)
+++ trunk/SKPDFView.m   2008-11-13 10:33:01 UTC (rev 4951)
@@ -4011,6 +4011,11 @@
         
         [[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 {


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 Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to