[_initBackendWindow:] corrected the registration of drag types,

when a window gets realized. We have to use a copy here, as the
original will get changed.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@9163 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2001-02-19 00:39:28 +00:00
parent 3b6e2d911e
commit cbf29dd632

View file

@ -581,6 +581,9 @@ static NSMapTable* windowmaps = NULL;
dragTypes = [context _dragTypesForWindow: self]; dragTypes = [context _dragTypesForWindow: self];
if (dragTypes) if (dragTypes)
{ {
// As this is the original entry, it will change soon.
// We use a copy to reregister the same types later on.
dragTypes = [dragTypes copy];
[context _removeDragTypes: dragTypes fromWindow: self]; [context _removeDragTypes: dragTypes fromWindow: self];
} }
@ -611,6 +614,8 @@ static NSMapTable* windowmaps = NULL;
{ {
NSDebugLLog(@"NSWindow", @"Resetting drag types for window"); NSDebugLLog(@"NSWindow", @"Resetting drag types for window");
[context _addDragTypes: dragTypes toWindow: self]; [context _addDragTypes: dragTypes toWindow: self];
// Free our local copy.
RELEASE(dragTypes);
} }
/* Other stuff we need to do for deferred windows */ /* Other stuff we need to do for deferred windows */