mirror of
https://github.com/alexkay/spek.git
synced 2025-04-18 17:37:39 +03:00
osx: Make it a foreground application
This commit is contained in:
parent
144d1fa2cf
commit
891db76d63
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user