Minor fixes

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4741 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
richard 1999-08-22 11:03:10 +00:00
parent 8bd717067e
commit 8edf3a229f
3 changed files with 18 additions and 6 deletions

View file

@ -481,9 +481,14 @@ GSSetDragTypes(NSView* obj, NSArray *types)
super_view = newSuper;
}
/*
* NOTE - this method is used when removing a view from a window
* (in which case, newWindow is nil) to let all the subviews know
* that they have also been removed from the window.
*/
- (void) viewWillMoveToWindow: (NSWindow*)newWindow
{
if (newWindow == window || !newWindow)
if (newWindow == window)
return;
if (_rFlags.has_draginfo)
@ -493,7 +498,8 @@ GSSetDragTypes(NSView* obj, NSArray *types)
if (window != nil)
[ctxt _removeDragTypes: t fromWindow: [window windowNumber]];
[ctxt _addDragTypes: t toWindow: [newWindow windowNumber]];
if (newWindow != nil)
[ctxt _addDragTypes: t toWindow: [newWindow windowNumber]];
}
window = newWindow;