[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [33470] trunk/blender/intern/ghost/intern/ GHOST_WindowCocoa.mm: Cocoa : fix drag and drop was no more operational after having fullscreened the window

Damien Plisson damien.plisson at yahoo.fr
Sat Dec 4 15:26:45 CET 2010


Revision: 33470
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=33470
Author:   damien78
Date:     2010-12-04 15:26:45 +0100 (Sat, 04 Dec 2010)

Log Message:
-----------
Cocoa : fix drag and drop was no more operational after having fullscreened the window

Modified Paths:
--------------
    trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm

Modified: trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm	2010-12-04 13:46:25 UTC (rev 33469)
+++ trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm	2010-12-04 14:26:45 UTC (rev 33470)
@@ -777,12 +777,14 @@
 				[tmpWindow setReleasedWhenClosed:NO];
 				[tmpWindow setAcceptsMouseMovedEvents:YES];
 				[tmpWindow setDelegate:[m_window delegate]];
+				[tmpWindow registerForDraggedTypes:[NSArray arrayWithObjects:NSFilenamesPboardType,
+												   NSStringPboardType, NSTIFFPboardType, nil]];
 				
 				//Assign the openGL view to the new window
 				[tmpWindow setContentView:m_openGLView];
 				
 				//Show the new window
-				[tmpWindow makeKeyAndOrderFront:nil];
+				[tmpWindow makeKeyAndOrderFront:m_openGLView];
 				//Close and release old window
 				[m_window setDelegate:nil]; // To avoid the notification of "window closed" event
 				[m_window close];
@@ -835,6 +837,10 @@
 				[tmpWindow setReleasedWhenClosed:NO];
 				[tmpWindow setAcceptsMouseMovedEvents:YES];
 				[tmpWindow setDelegate:[m_window delegate]];
+				[tmpWindow registerForDraggedTypes:[NSArray arrayWithObjects:NSFilenamesPboardType,
+												   NSStringPboardType, NSTIFFPboardType, nil]];
+				//Forbid to resize the window below the blender defined minimum one
+				[tmpWindow setContentMinSize:NSMakeSize(320, 240)];
 				
 				//Assign the openGL view to the new window
 				[tmpWindow setContentView:m_openGLView];





More information about the Bf-blender-cvs mailing list