forked from bartvdbraak/blender
Cocoa : fix drag and drop was no more operational after having fullscreened the window
This commit is contained in:
parent
282910fdae
commit
5150884550
@ -777,12 +777,14 @@ GHOST_TSuccess GHOST_WindowCocoa::setState(GHOST_TWindowState state)
|
|||||||
[tmpWindow setReleasedWhenClosed:NO];
|
[tmpWindow setReleasedWhenClosed:NO];
|
||||||
[tmpWindow setAcceptsMouseMovedEvents:YES];
|
[tmpWindow setAcceptsMouseMovedEvents:YES];
|
||||||
[tmpWindow setDelegate:[m_window delegate]];
|
[tmpWindow setDelegate:[m_window delegate]];
|
||||||
|
[tmpWindow registerForDraggedTypes:[NSArray arrayWithObjects:NSFilenamesPboardType,
|
||||||
|
NSStringPboardType, NSTIFFPboardType, nil]];
|
||||||
|
|
||||||
//Assign the openGL view to the new window
|
//Assign the openGL view to the new window
|
||||||
[tmpWindow setContentView:m_openGLView];
|
[tmpWindow setContentView:m_openGLView];
|
||||||
|
|
||||||
//Show the new window
|
//Show the new window
|
||||||
[tmpWindow makeKeyAndOrderFront:nil];
|
[tmpWindow makeKeyAndOrderFront:m_openGLView];
|
||||||
//Close and release old window
|
//Close and release old window
|
||||||
[m_window setDelegate:nil]; // To avoid the notification of "window closed" event
|
[m_window setDelegate:nil]; // To avoid the notification of "window closed" event
|
||||||
[m_window close];
|
[m_window close];
|
||||||
@ -835,6 +837,10 @@ GHOST_TSuccess GHOST_WindowCocoa::setState(GHOST_TWindowState state)
|
|||||||
[tmpWindow setReleasedWhenClosed:NO];
|
[tmpWindow setReleasedWhenClosed:NO];
|
||||||
[tmpWindow setAcceptsMouseMovedEvents:YES];
|
[tmpWindow setAcceptsMouseMovedEvents:YES];
|
||||||
[tmpWindow setDelegate:[m_window delegate]];
|
[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
|
//Assign the openGL view to the new window
|
||||||
[tmpWindow setContentView:m_openGLView];
|
[tmpWindow setContentView:m_openGLView];
|
||||||
|
Loading…
Reference in New Issue
Block a user