diff options
author | Damien Plisson <damien.plisson@yahoo.fr> | 2010-12-04 17:26:45 +0300 |
---|---|---|
committer | Damien Plisson <damien.plisson@yahoo.fr> | 2010-12-04 17:26:45 +0300 |
commit | 51508845506387dd0a61c8a7712aa4335b8635af (patch) | |
tree | 64ebe3428d231716fc033c0109a402f45c43bac9 /intern | |
parent | 282910fdaebaeae26ceeaea6c5c260f90a5f5deb (diff) |
Cocoa : fix drag and drop was no more operational after having fullscreened the window
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_WindowCocoa.mm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm index c43a9b57721..0b6393c06b6 100644 --- a/intern/ghost/intern/GHOST_WindowCocoa.mm +++ b/intern/ghost/intern/GHOST_WindowCocoa.mm @@ -777,12 +777,14 @@ GHOST_TSuccess GHOST_WindowCocoa::setState(GHOST_TWindowState state) [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 @@ GHOST_TSuccess GHOST_WindowCocoa::setState(GHOST_TWindowState state) [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]; |