[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #25709] NSRulerView's delegate method rulerView:willAddMarker:atLoc
From: |
Doug Simons |
Subject: |
[bug #25709] NSRulerView's delegate method rulerView:willAddMarker:atLocation: not called on a click |
Date: |
Thu, 09 Apr 2009 23:04:24 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_4_11; en) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1 |
Follow-up Comment #1, bug #25709 (project gnustep):
Here's the diff for a fix that works for me to resolve this problem:
root@ubuntu804desktop:/gstep/modules/core/gui/Source# svn diff
NSRulerMarker.m
Index: NSRulerMarker.m
===================================================================
--- NSRulerMarker.m (revision 28185)
+++ NSRulerMarker.m (working copy)
@@ -227,7 +227,7 @@
- (BOOL)trackMouse:(NSEvent *)theEvent adding:(BOOL)adding
{
NSView *client = [_rulerView clientView];
- NSEvent *newEvent;
+ NSEvent *newEvent = nil;
int eventMask = NSLeftMouseDraggedMask | NSLeftMouseUpMask;
BOOL isFar = NO;
BOOL askedCanRemove = NO;
@@ -341,12 +341,18 @@
/* loop processing events until mouse up */
while (_isDragging)
{
- newEvent = [NSApp nextEventMatchingMask: eventMask
+ if (newEvent == nil) {
+ newEvent = theEvent;
+ previousMousePositionInWindow = NSMakePoint(0,0);
+ } else {
+ newEvent = [NSApp nextEventMatchingMask: eventMask
untilDate: [NSDate distantFuture]
inMode: NSEventTrackingRunLoopMode
dequeue: YES];
+ }
switch ([newEvent type])
{
+ case NSLeftMouseDown:
case NSLeftMouseDragged:
/* take mouse position from outside of event stream
and ignore event if in same position as previous event,
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?25709>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #25709] NSRulerView's delegate method rulerView:willAddMarker:atLocation: not called on a click,
Doug Simons <=