From cbf29dd6327401ca3dff1d6d3406ffda05019522 Mon Sep 17 00:00:00 2001 From: Fred Kiefer Date: Mon, 19 Feb 2001 00:39:28 +0000 Subject: [PATCH] [_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 --- Source/NSWindow.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/NSWindow.m b/Source/NSWindow.m index 931a95ef1..3277742e4 100644 --- a/Source/NSWindow.m +++ b/Source/NSWindow.m @@ -581,6 +581,9 @@ static NSMapTable* windowmaps = NULL; dragTypes = [context _dragTypesForWindow: self]; 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]; } @@ -611,6 +614,8 @@ static NSMapTable* windowmaps = NULL; { NSDebugLLog(@"NSWindow", @"Resetting drag types for window"); [context _addDragTypes: dragTypes toWindow: self]; + // Free our local copy. + RELEASE(dragTypes); } /* Other stuff we need to do for deferred windows */