Revision: 5567
          http://skim-app.svn.sourceforge.net/skim-app/?rev=5567&view=rev
Author:   hofman
Date:     2009-08-17 23:23:58 +0000 (Mon, 17 Aug 2009)

Log Message:
-----------
eat up mouse event when clicking on the status bar

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

Modified: trunk/SKStatusBar.m
===================================================================
--- trunk/SKStatusBar.m 2009-08-17 21:32:25 UTC (rev 5566)
+++ trunk/SKStatusBar.m 2009-08-17 23:23:58 UTC (rev 5567)
@@ -239,12 +239,14 @@
     NSRect leftRect, rightRect;
     [self getLeftFrame:&leftRect rightFrame:&rightRect];
     if (NSMouseInRect(mouseLoc, rightRect, [self isFlipped])) {
-        theEvent = [[self window] nextEventMatchingMask: NSLeftMouseUpMask];
+        while ([theEvent type] != NSLeftMouseUp)
+            theEvent = [[self window] nextEventMatchingMask: 
NSLeftMouseDraggedMask | NSLeftMouseUpMask];
         mouseLoc = [self convertPoint:[theEvent locationInWindow] 
fromView:nil];
         if (NSMouseInRect(mouseLoc, rightRect, [self isFlipped]))
             [rightCell performClick:self];
     } else if (NSMouseInRect(mouseLoc, leftRect, [self isFlipped])) {
-        theEvent = [[self window] nextEventMatchingMask: NSLeftMouseUpMask];
+        while ([theEvent type] != NSLeftMouseUp)
+            theEvent = [[self window] nextEventMatchingMask: 
NSLeftMouseDraggedMask | NSLeftMouseUpMask];
         mouseLoc = [self convertPoint:[theEvent locationInWindow] 
fromView:nil];
         if (NSMouseInRect(mouseLoc, leftRect, [self isFlipped]))
             [leftCell performClick:self];


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