Minor retain/release fix.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@12142 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2002-01-20 17:54:13 +00:00
parent c3482dbb8e
commit 4cce5e649a
2 changed files with 20 additions and 15 deletions

View file

@ -1,3 +1,9 @@
2002-01-20 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSWindow.m: ([-sendEvent:]) use ASSIGN() and DESTROY() to
update _lastDragView so we don't run into problems if something
deallocates it.
Thu Jan 17 18:16:08 2002 Nicola Pero <n.pero@mi.flashnet.it>
* Source/NSTextView.m ([-_blink:]): Fixed declaration - should take

View file

@ -2896,8 +2896,10 @@ resetCursorRectsForView(NSView *theView)
case GSAppKitDraggingEnter:
case GSAppKitDraggingUpdate:
v = [_contentView hitTest: [theEvent locationInWindow]];
if (!v)
if (v != nil)
{
v = _contentView;
}
dragInfo = [GSCurrentContext() _dragInfo];
if (_lastDragView && _lastDragView != v && _f.accepts_drag)
{
@ -2937,7 +2939,7 @@ resetCursorRectsForView(NSView *theView)
_lastDragOperationMask = action;
[dragInfo postDragEvent: e];
_lastDragView = v;
ASSIGN(_lastDragView, v);
break;
case GSAppKitDraggingStatus:
@ -2953,7 +2955,7 @@ resetCursorRectsForView(NSView *theView)
@selector(draggingExited:), dragInfo);
}
_lastDragOperationMask = NSDragOperationNone;
_lastDragView = nil;
DESTROY(_lastDragView);
break;
case GSAppKitDraggingDrop:
@ -2962,24 +2964,21 @@ resetCursorRectsForView(NSView *theView)
{
action = NO;
GSPerformDragSelector(_lastDragView,
@selector(prepareForDragOperation:),
dragInfo, action);
@selector(prepareForDragOperation:), dragInfo, action);
if (action)
{
action = NO;
GSPerformDragSelector(_lastDragView,
@selector(performDragOperation:),
dragInfo, action);
@selector(performDragOperation:), dragInfo, action);
}
if (action)
{
GSPerformVoidDragSelector(_lastDragView,
@selector(concludeDragOperation:),
dragInfo);
@selector(concludeDragOperation:), dragInfo);
}
}
_lastDragOperationMask = NSDragOperationNone;
_lastDragView = nil;
DESTROY(_lastDragView);
e = [NSEvent otherEventWithType: NSAppKitDefined
location: [theEvent locationInWindow]
modifierFlags: 0
@ -2994,7 +2993,7 @@ resetCursorRectsForView(NSView *theView)
case GSAppKitDraggingFinished:
_lastDragOperationMask = NSDragOperationNone;
_lastDragView = nil;
DESTROY(_lastDragView);
NSDebugLLog(@"NSDragging",
@"Internal: dropped GSAppKitDraggingFinished event");
break;