mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 16:20:38 +00:00
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:
parent
c3482dbb8e
commit
4cce5e649a
2 changed files with 20 additions and 15 deletions
|
@ -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>
|
Thu Jan 17 18:16:08 2002 Nicola Pero <n.pero@mi.flashnet.it>
|
||||||
|
|
||||||
* Source/NSTextView.m ([-_blink:]): Fixed declaration - should take
|
* Source/NSTextView.m ([-_blink:]): Fixed declaration - should take
|
||||||
|
|
|
@ -2896,13 +2896,15 @@ resetCursorRectsForView(NSView *theView)
|
||||||
case GSAppKitDraggingEnter:
|
case GSAppKitDraggingEnter:
|
||||||
case GSAppKitDraggingUpdate:
|
case GSAppKitDraggingUpdate:
|
||||||
v = [_contentView hitTest: [theEvent locationInWindow]];
|
v = [_contentView hitTest: [theEvent locationInWindow]];
|
||||||
if (!v)
|
if (v != nil)
|
||||||
v = _contentView;
|
{
|
||||||
|
v = _contentView;
|
||||||
|
}
|
||||||
dragInfo = [GSCurrentContext() _dragInfo];
|
dragInfo = [GSCurrentContext() _dragInfo];
|
||||||
if (_lastDragView && _lastDragView != v && _f.accepts_drag)
|
if (_lastDragView && _lastDragView != v && _f.accepts_drag)
|
||||||
{
|
{
|
||||||
GSPerformVoidDragSelector(_lastDragView,
|
GSPerformVoidDragSelector(_lastDragView,
|
||||||
@selector(draggingExited:), dragInfo);
|
@selector(draggingExited:), dragInfo);
|
||||||
}
|
}
|
||||||
_f.accepts_drag = GSViewAcceptsDrag(v, dragInfo);
|
_f.accepts_drag = GSViewAcceptsDrag(v, dragInfo);
|
||||||
if (_f.accepts_drag)
|
if (_f.accepts_drag)
|
||||||
|
@ -2911,7 +2913,7 @@ resetCursorRectsForView(NSView *theView)
|
||||||
{
|
{
|
||||||
action = NSDragOperationNone;
|
action = NSDragOperationNone;
|
||||||
GSPerformDragSelector(v, @selector(draggingEntered:),
|
GSPerformDragSelector(v, @selector(draggingEntered:),
|
||||||
dragInfo, action);
|
dragInfo, action);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2937,7 +2939,7 @@ resetCursorRectsForView(NSView *theView)
|
||||||
|
|
||||||
_lastDragOperationMask = action;
|
_lastDragOperationMask = action;
|
||||||
[dragInfo postDragEvent: e];
|
[dragInfo postDragEvent: e];
|
||||||
_lastDragView = v;
|
ASSIGN(_lastDragView, v);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GSAppKitDraggingStatus:
|
case GSAppKitDraggingStatus:
|
||||||
|
@ -2950,10 +2952,10 @@ resetCursorRectsForView(NSView *theView)
|
||||||
if (_lastDragView && _f.accepts_drag)
|
if (_lastDragView && _f.accepts_drag)
|
||||||
{
|
{
|
||||||
GSPerformVoidDragSelector(_lastDragView,
|
GSPerformVoidDragSelector(_lastDragView,
|
||||||
@selector(draggingExited:), dragInfo);
|
@selector(draggingExited:), dragInfo);
|
||||||
}
|
}
|
||||||
_lastDragOperationMask = NSDragOperationNone;
|
_lastDragOperationMask = NSDragOperationNone;
|
||||||
_lastDragView = nil;
|
DESTROY(_lastDragView);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GSAppKitDraggingDrop:
|
case GSAppKitDraggingDrop:
|
||||||
|
@ -2962,24 +2964,21 @@ resetCursorRectsForView(NSView *theView)
|
||||||
{
|
{
|
||||||
action = NO;
|
action = NO;
|
||||||
GSPerformDragSelector(_lastDragView,
|
GSPerformDragSelector(_lastDragView,
|
||||||
@selector(prepareForDragOperation:),
|
@selector(prepareForDragOperation:), dragInfo, action);
|
||||||
dragInfo, action);
|
|
||||||
if (action)
|
if (action)
|
||||||
{
|
{
|
||||||
action = NO;
|
action = NO;
|
||||||
GSPerformDragSelector(_lastDragView,
|
GSPerformDragSelector(_lastDragView,
|
||||||
@selector(performDragOperation:),
|
@selector(performDragOperation:), dragInfo, action);
|
||||||
dragInfo, action);
|
|
||||||
}
|
}
|
||||||
if (action)
|
if (action)
|
||||||
{
|
{
|
||||||
GSPerformVoidDragSelector(_lastDragView,
|
GSPerformVoidDragSelector(_lastDragView,
|
||||||
@selector(concludeDragOperation:),
|
@selector(concludeDragOperation:), dragInfo);
|
||||||
dragInfo);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_lastDragOperationMask = NSDragOperationNone;
|
_lastDragOperationMask = NSDragOperationNone;
|
||||||
_lastDragView = nil;
|
DESTROY(_lastDragView);
|
||||||
e = [NSEvent otherEventWithType: NSAppKitDefined
|
e = [NSEvent otherEventWithType: NSAppKitDefined
|
||||||
location: [theEvent locationInWindow]
|
location: [theEvent locationInWindow]
|
||||||
modifierFlags: 0
|
modifierFlags: 0
|
||||||
|
@ -2994,7 +2993,7 @@ resetCursorRectsForView(NSView *theView)
|
||||||
|
|
||||||
case GSAppKitDraggingFinished:
|
case GSAppKitDraggingFinished:
|
||||||
_lastDragOperationMask = NSDragOperationNone;
|
_lastDragOperationMask = NSDragOperationNone;
|
||||||
_lastDragView = nil;
|
DESTROY(_lastDragView);
|
||||||
NSDebugLLog(@"NSDragging",
|
NSDebugLLog(@"NSDragging",
|
||||||
@"Internal: dropped GSAppKitDraggingFinished event");
|
@"Internal: dropped GSAppKitDraggingFinished event");
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue