removed redundant OBCocoa files / namespace; moved functions to UBPlatformUtils, which serves the same purpose
parent
e1014a0138
commit
b219655ac2
@ -1,11 +0,0 @@ |
|||||||
/*
|
|
||||||
OBCocoa.h |
|
||||||
|
|
||||||
Header file permitting access to Mac OSX / Cocoa specific functions |
|
||||||
|
|
||||||
*/ |
|
||||||
|
|
||||||
|
|
||||||
namespace OBCocoa { |
|
||||||
void setFrontProcess(); |
|
||||||
} |
|
@ -1,24 +0,0 @@ |
|||||||
#include "OBCocoa.h" |
|
||||||
#include "UBApplicationController.h" |
|
||||||
|
|
||||||
#include <QDebug> |
|
||||||
#import <Cocoa/Cocoa.h> |
|
||||||
|
|
||||||
namespace OBCocoa { |
|
||||||
|
|
||||||
/** |
|
||||||
* @brief Activate the current application |
|
||||||
*/ |
|
||||||
void setFrontProcess() |
|
||||||
{ |
|
||||||
NSRunningApplication* app = [NSRunningApplication currentApplication]; |
|
||||||
|
|
||||||
// activate the application, forcing focus on it |
|
||||||
[app activateWithOptions: NSApplicationActivateIgnoringOtherApps]; |
|
||||||
|
|
||||||
// other option:NSApplicationActivateAllWindows. This won't steal focus from another app, e.g |
|
||||||
// if the user is doing something else while waiting for OpenBoard to load |
|
||||||
} |
|
||||||
|
|
||||||
|
|
||||||
} // namespace OBCocoa |
|
Loading…
Reference in new issue