DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit 4c16874a52915b2929f8d6e4c5d3b23ebf52affe
parent b85c155db2cb2c197b9530e01c4c8b571a17690d
Author: falkTX <falktx@gmail.com>
Date:   Sat, 18 Jan 2014 16:49:35 -0800

Some OSX experiments

Diffstat:
Mdgl/src/pugl/pugl_osx.m | 6++++++
Mdgl/src/pugl/pugl_osx_extended.m | 6+++++-
2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/dgl/src/pugl/pugl_osx.m b/dgl/src/pugl/pugl_osx.m @@ -36,6 +36,7 @@ defer:(BOOL)flag; - (void) setPuglview:(PuglView*)view; - (BOOL) windowShouldClose:(id)sender; +- (BOOL) canBecomeKeyWindow; @end @implementation PuglWindow @@ -70,6 +71,11 @@ return YES; } +- (BOOL)canBecomeKeyWindow +{ + return YES; +} + @end void diff --git a/dgl/src/pugl/pugl_osx_extended.m b/dgl/src/pugl/pugl_osx_extended.m @@ -25,7 +25,11 @@ void puglImplFocus(PuglView* view) { + id window = view->impl->window; + // TODO + [NSApp activateIgnoringOtherApps:YES]; + [window makeKeyAndOrderFront:window]; } void puglImplSetSize(PuglView* view, unsigned int width, unsigned int height) @@ -36,7 +40,7 @@ void puglImplSetSize(PuglView* view, unsigned int width, unsigned int height) frame.origin.y -= frame.size.height; frame.origin.y += height; frame.size.width = width; - frame.size.height = height; + frame.size.height = height+20; [window setFrame:frame display:YES animate:NO]; }