Statistics
| Branch: | Revision:

root / src / tkenv / osxproctype.cc @ e1750c09

History | View | Annotate | Download (1.11 KB)

1 01873262 Georg Kunz
//==========================================================================
2
//  OSXPROCTYPE.CC - part of
3
//
4
//                     OMNeT++/OMNEST
5
//            Discrete System Simulation in C++
6
//
7
//==========================================================================
8
9
/*--------------------------------------------------------------*
10
  Copyright (C) 1992-2008 Andras Varga
11
  Copyright (C) 2006-2008 OpenSim Ltd.
12

13
  This file is distributed WITHOUT ANY WARRANTY. See the file
14
  `license' for details on this and other legal matters.
15
*--------------------------------------------------------------*/
16
17
#include <Carbon/Carbon.h>
18
19
//
20
// The following is required to display the menu correctly on Mac OS X 10.5.
21
// An alternative solution would be to create a bundled application;
22
// as much as putting the executable into a directory called Contents/MacOS,
23
// or even creating Contents directory next to the executable would do,
24
// but its not an elegant solution.
25
//
26
void OSXTransformProcess()
27
{
28
    ProcessSerialNumber psn;
29
    GetCurrentProcess( &psn );
30
    TransformProcessType( &psn, kProcessTransformToForegroundApplication);
31
}