commit ba412936279c335a49a722dd70193cb9c5063ea2
parent 12c770f8c5e0739d03633e792ae7a931b36fc4e4
Author: falkTX <falktx@gmail.com>
Date: Sun, 9 Mar 2014 18:36:32 +0000
More osx testing
Diffstat:
2 files changed, 37 insertions(+), 1 deletion(-)
diff --git a/dgl/src/pugl/pugl_osx.m b/dgl/src/pugl/pugl_osx.m
@@ -55,12 +55,15 @@
[result setLevel: CGShieldingWindowLevel() + 1];
return result;
+
+ // unused
+ (void)aStyle; (void)bufferingType; (void)flag;
}
- (void)setPuglview:(PuglView*)view
{
puglview = view;
- [self setContentSize:NSMakeSize(view->width, view->height) ];
+ [self setContentSize:NSMakeSize(view->width, view->height)];
}
- (BOOL)windowShouldClose:(id)sender
@@ -68,6 +71,9 @@
if (puglview->closeFunc)
puglview->closeFunc(puglview);
return YES;
+
+ // unused
+ (void)sender;
}
@end
@@ -176,6 +182,9 @@ puglDisplay(PuglView* view)
puglDisplay(puglview);
glFlush();
glSwapAPPLE();
+
+ // unused
+ return; (void)rect;
}
static unsigned
@@ -213,10 +222,15 @@ getModifiers(PuglView* view, NSEvent* ev)
- (void)mouseEntered:(NSEvent*)theEvent
{
[self updateTrackingAreas];
+
+ // unused
+ return; (void)theEvent;
}
- (void)mouseExited:(NSEvent*)theEvent
{
+ // unused
+ return; (void)theEvent;
}
- (void) mouseMoved:(NSEvent*)event
@@ -358,7 +372,23 @@ puglCreate(PuglNativeWindow parent,
[NSAutoreleasePool new];
[NSApplication sharedApplication];
+ // TESTING!
+#if 1
+ NSApplication* app = [NSApplication sharedApplication];
+
+ if ([app respondsToSelector: @selector(setActivationPolicy:)]) {
+
+ NSMethodSignature* method = [[app class] instanceMethodSignatureForSelector: @selector(setActivationPolicy:)];
+ NSInvocation* invocation = [NSInvocation invocationWithMethodSignature: method];
+ [invocation setTarget: app];
+ [invocation setSelector: @selector(setActivationPolicy:)];
+ NSInteger myNSApplicationActivationPolicyAccessory = 0;
+ [invocation setArgument: &myNSApplicationActivationPolicyAccessory atIndex: 2];
+ [invocation invoke];
+ }
+#else
[NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
+#endif
[NSApp finishLaunching];
NSString* titleString = [[NSString alloc]
@@ -386,6 +416,9 @@ puglCreate(PuglNativeWindow parent,
}
return view;
+
+ // unused
+ (void)parent; (void)resizable;
}
void
diff --git a/dgl/src/pugl/pugl_osx_extended.m b/dgl/src/pugl/pugl_osx_extended.m
@@ -76,6 +76,9 @@ void puglImplSetSize(PuglView* view, unsigned int width, unsigned int height, bo
// } else {
[window setFrame:frame display:YES animate:NO];
// }
+
+ // unused
+ return; (void)forced;
}
void puglImplSetTitle(PuglView* view, const char* title)