Revision: 4490
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4490&view=rev
Author:   hofman
Date:     2008-09-01 09:20:38 +0000 (Mon, 01 Sep 2008)

Log Message:
-----------
Track drag events in NSEventTrackingRunLoopMode rather than NSDefaultRunLoopMode

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

Modified: trunk/SKNoteOutlineView.m
===================================================================
--- trunk/SKNoteOutlineView.m   2008-08-31 22:20:16 UTC (rev 4489)
+++ trunk/SKNoteOutlineView.m   2008-09-01 09:20:38 UTC (rev 4490)
@@ -100,7 +100,7 @@
         if (row != -1 && [[self delegate] outlineView:self 
canResizeRowByItem:[self itemAtRow:row]]) {
             NSRect ignored, rect;
             NSDivideRect([self rectOfRow:row], &rect, &ignored, 5.0, [self 
isFlipped] ? NSMaxYEdge : NSMinYEdge);
-            if (NSPointInRect(mouseLoc, rect) && NSLeftMouseDragged == [[NSApp 
nextEventMatchingMask:(NSLeftMouseUpMask | NSLeftMouseDraggedMask) 
untilDate:[NSDate distantFuture] inMode:NSDefaultRunLoopMode dequeue:NO] type]) 
{
+            if (NSPointInRect(mouseLoc, rect) && NSLeftMouseDragged == [[NSApp 
nextEventMatchingMask:(NSLeftMouseUpMask | NSLeftMouseDraggedMask) 
untilDate:[NSDate distantFuture] inMode:NSEventTrackingRunLoopMode dequeue:NO] 
type]) {
                 [self resizeRow:row withEvent:theEvent];
                 return;
             }

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2008-08-31 22:20:16 UTC (rev 4489)
+++ trunk/SKPDFView.m   2008-09-01 09:20:38 UTC (rev 4490)
@@ -2952,7 +2952,7 @@
                    annotationMode != SKHighlightNote && annotationMode != 
SKUnderlineNote && annotationMode != SKStrikeOutNote &&
                    NSPointInRect(pagePoint, [page boundsForBox:[self 
displayBox]])) {
             // add a new annotation immediately, unless this is just a click
-            if (annotationMode == SKAnchoredNote || NSLeftMouseDragged == 
[[NSApp nextEventMatchingMask:(NSLeftMouseUpMask | NSLeftMouseDraggedMask) 
untilDate:[NSDate distantFuture] inMode:NSDefaultRunLoopMode dequeue:NO] type]) 
{
+            if (annotationMode == SKAnchoredNote || NSLeftMouseDragged == 
[[NSApp nextEventMatchingMask:(NSLeftMouseUpMask | NSLeftMouseDraggedMask) 
untilDate:[NSDate distantFuture] inMode:NSEventTrackingRunLoopMode dequeue:NO] 
type]) {
                 NSSize size = annotationMode == SKAnchoredNote ? 
SKNPDFAnnotationNoteSize : NSZeroSize;
                 NSRect bounds = SKRectFromCenterAndSize(pagePoint, size);
                 [self addAnnotationWithType:annotationMode contents:nil 
page:page bounds:bounds];
@@ -2961,7 +2961,7 @@
                 clickDelta.x = pagePoint.x - NSMinX(bounds);
                 clickDelta.y = pagePoint.y - NSMinY(bounds);
             }
-        } else if ([newActiveAnnotation isMarkup] && NSLeftMouseDragged == 
[[NSApp nextEventMatchingMask:(NSLeftMouseUpMask | NSLeftMouseDraggedMask) 
untilDate:[NSDate distantFuture] inMode:NSDefaultRunLoopMode dequeue:NO] type]) 
{
+        } else if ([newActiveAnnotation isMarkup] && NSLeftMouseDragged == 
[[NSApp nextEventMatchingMask:(NSLeftMouseUpMask | NSLeftMouseDraggedMask) 
untilDate:[NSDate distantFuture] inMode:NSEventTrackingRunLoopMode dequeue:NO] 
type]) {
             newActiveAnnotation = nil;
             mouseDownInAnnotation = YES;
         } else if (([theEvent modifierFlags] & NSShiftKeyMask) && 
[activeAnnotation isEqual:newActiveAnnotation] == NO && [[activeAnnotation 
page] isEqual:[newActiveAnnotation page]] && [[activeAnnotation type] 
isEqualToString:[newActiveAnnotation type]] && [activeAnnotation isMarkup]) {


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