Activate apps

This commit is contained in:
Hajime Hoshi 2013-12-08 22:22:54 +09:00
parent 63abfb2c13
commit 05fbee10d4
2 changed files with 6 additions and 1 deletions

View File

@ -66,6 +66,8 @@ void* CreateWindow(size_t width, size_t height, const char* title, void* glConte
return window;
}
static BOOL initialBoot = YES;
void PollEvents(void) {
for (;;) {
NSEvent* event = [NSApp nextEventMatchingMask:NSAnyEventMask
@ -77,6 +79,10 @@ void PollEvents(void) {
}
[NSApp sendEvent:event];
}
if (initialBoot) {
[NSApp activateIgnoringOtherApps:YES];
initialBoot = NO;
}
}
void UseGLContext(void* glContextPtr) {

View File

@ -42,7 +42,6 @@ func runWindow(width, height int, title string, sharedContext unsafe.Pointer) *w
w.loop()
}()
<-ch
// TODO: Activate here?
return w
}