mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 05:01:00 +00:00
Minor bugfix
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5596 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
86882fc677
commit
ab48c495ec
3 changed files with 22 additions and 18 deletions
|
@ -1,3 +1,9 @@
|
|||
Mon Dec 20 15:28:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
|
||||
* Source/NSView.m: Fix removal of view from window such that we reset
|
||||
the windows first responder if any of the removed views in first
|
||||
responder (avoid crash iv views subsequently deallocated).
|
||||
|
||||
Mon Dec 20 11:00:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
|
||||
* Source/NSSavePanel.m: Use symbolic constants for resize mask.
|
||||
|
|
|
@ -387,10 +387,6 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
|||
{
|
||||
return;
|
||||
}
|
||||
if ([window firstResponder] == self)
|
||||
{
|
||||
[window makeFirstResponder: window];
|
||||
}
|
||||
RETAIN(self);
|
||||
[super_view->sub_views removeObjectIdenticalTo: self];
|
||||
if ([super_view->sub_views count] == 0)
|
||||
|
@ -419,10 +415,6 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
|||
{
|
||||
return;
|
||||
}
|
||||
if ([window firstResponder] == self)
|
||||
{
|
||||
[window makeFirstResponder: window];
|
||||
}
|
||||
[super_view setNeedsDisplayInRect: frame];
|
||||
RETAIN(self);
|
||||
[super_view->sub_views removeObjectIdenticalTo: self];
|
||||
|
@ -519,18 +511,27 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
|||
- (void) viewWillMoveToWindow: (NSWindow*)newWindow
|
||||
{
|
||||
if (newWindow == window)
|
||||
{
|
||||
return;
|
||||
|
||||
}
|
||||
if (_rFlags.has_draginfo)
|
||||
{
|
||||
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||
NSArray *t = GSGetDragTypes(self);
|
||||
|
||||
if (window != nil)
|
||||
{
|
||||
[ctxt _removeDragTypes: t fromWindow: [window windowNumber]];
|
||||
}
|
||||
if (newWindow != nil)
|
||||
{
|
||||
[ctxt _addDragTypes: t toWindow: [newWindow windowNumber]];
|
||||
}
|
||||
}
|
||||
if (newWindow == nil && [window firstResponder] == self)
|
||||
{
|
||||
[window makeFirstResponder: window];
|
||||
}
|
||||
|
||||
window = newWindow;
|
||||
|
||||
|
@ -545,9 +546,11 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
|||
|
||||
[sub_views getObjects: array];
|
||||
for (i = 0; i < count; ++i)
|
||||
{
|
||||
[array[i] viewWillMoveToWindow: newWindow];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void) rotateByAngle: (float)angle
|
||||
|
|
|
@ -1478,8 +1478,6 @@ resetCursorRectsForView(NSView *theView)
|
|||
if ((first_responder) && (![first_responder resignFirstResponder]))
|
||||
return NO;
|
||||
|
||||
// FIXME
|
||||
// [first_responder resignFirstResponder];
|
||||
first_responder = aResponder;
|
||||
[first_responder becomeFirstResponder];
|
||||
return YES;
|
||||
|
@ -2765,7 +2763,6 @@ resetCursorRectsForView(NSView *theView)
|
|||
{
|
||||
BOOL flag;
|
||||
NSPoint p;
|
||||
id nxt = RETAIN([self nextResponder]);
|
||||
|
||||
[super encodeWithCoder: aCoder];
|
||||
|
||||
|
@ -2810,8 +2807,6 @@ resetCursorRectsForView(NSView *theView)
|
|||
[aCoder encodeConditionalObject: _initial_first_responder];
|
||||
|
||||
NSDebugLog(@"NSWindow: finish encoding\n");
|
||||
|
||||
RELEASE(nxt);
|
||||
}
|
||||
|
||||
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||
|
|
Loading…
Reference in a new issue