* Source/NSRulerMarker.m: Changes suggested by Doug Simons for

allowing markers to be set on an NSMouseDown event.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28188 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2009-04-10 02:55:34 +00:00
parent 6bd3b14d85
commit b49179235d
2 changed files with 21 additions and 6 deletions

View file

@ -1,3 +1,8 @@
2009-04-09 22:55-EDT Gregory John Casamento <greg_casamento@yahoo.com>
* Source/NSRulerMarker.m: Changes suggested by Doug Simons for
allowing markers to be set on an NSMouseDown event.
2009-04-07 22:21-EDT Gregory John Casamento <greg_casamento@yahoo.com>
* Source/NSDocumentController.m: Return default type if the

View file

@ -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,22 @@
/* loop processing events until mouse up */
while (_isDragging)
{
newEvent = [NSApp nextEventMatchingMask: eventMask
untilDate: [NSDate distantFuture]
inMode: NSEventTrackingRunLoopMode
dequeue: YES];
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,