osx: Make it a foreground application

This commit is contained in:
Alexander Kojevnikov 2012-08-16 09:35:18 -07:00
parent 144d1fa2cf
commit 891db76d63
2 changed files with 16 additions and 0 deletions

View File

@ -18,12 +18,25 @@
#include <cstring>
#ifdef OS_OSX
#include <ApplicationServices/ApplicationServices.h>
#endif
#include <wx/filename.h>
#include <wx/stdpaths.h>
#include <wx/utils.h>
#include "spek-platform.hh"
void SpekPlatform::init()
{
#ifdef OS_OSX
ProcessSerialNumber PSN;
GetCurrentProcess(&PSN);
TransformProcessType(&PSN, kProcessTransformToForegroundApplication);
#endif
}
wxString SpekPlatform::config_path(const wxString& app_name)
{
#ifdef OS_WIN

View File

@ -25,6 +25,9 @@
class SpekPlatform
{
public:
// Platform-specific initialisation code.
void init();
// Not quite XDG-compatible, but close enough.
static wxString config_path(const wxString& app_name);