fixed: drag and drop error on mavericks - never create your own instance of NSApplication\!
This commit is contained in:
parent
88a84b6f04
commit
39a2ecbd8f
|
@ -22,7 +22,6 @@
|
||||||
|
|
||||||
NSWindow* g_dragWindow = NULL;
|
NSWindow* g_dragWindow = NULL;
|
||||||
COSXDragView* g_dragView = NULL;
|
COSXDragView* g_dragView = NULL;
|
||||||
NSApplication* g_app = NULL;
|
|
||||||
|
|
||||||
void
|
void
|
||||||
runCocoaApp()
|
runCocoaApp()
|
||||||
|
@ -32,9 +31,7 @@ runCocoaApp()
|
||||||
|
|
||||||
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
|
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
|
||||||
|
|
||||||
|
[NSApplication sharedApplication];
|
||||||
NSApplication* app = [[NSApplication alloc] init];
|
|
||||||
g_app = app;
|
|
||||||
|
|
||||||
NSWindow* window = [[NSWindow alloc]
|
NSWindow* window = [[NSWindow alloc]
|
||||||
initWithContentRect: NSMakeRect(0, 0, 3, 3)
|
initWithContentRect: NSMakeRect(0, 0, 3, 3)
|
||||||
|
@ -52,7 +49,7 @@ runCocoaApp()
|
||||||
[window setContentView: dragView];
|
[window setContentView: dragView];
|
||||||
|
|
||||||
NSLog(@"starting cocoa loop");
|
NSLog(@"starting cocoa loop");
|
||||||
[app run];
|
[NSApp run];
|
||||||
|
|
||||||
NSLog(@"cocoa: release");
|
NSLog(@"cocoa: release");
|
||||||
[pool release];
|
[pool release];
|
||||||
|
@ -61,7 +58,7 @@ runCocoaApp()
|
||||||
void
|
void
|
||||||
stopCocoaLoop()
|
stopCocoaLoop()
|
||||||
{
|
{
|
||||||
[g_app stop: g_dragWindow];
|
[NSApp stop: g_dragWindow];
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue