Browse Source

Some OSX experiments

gh-pages
falkTX 10 years ago
parent
commit
4c16874a52
2 changed files with 11 additions and 1 deletions
  1. +6
    -0
      dgl/src/pugl/pugl_osx.m
  2. +5
    -1
      dgl/src/pugl/pugl_osx_extended.m

+ 6
- 0
dgl/src/pugl/pugl_osx.m View File

@@ -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


+ 5
- 1
dgl/src/pugl/pugl_osx_extended.m View File

@@ -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];
}


Loading…
Cancel
Save