src/jdk.jpackage/macosx/native/libapplauncher/MacPlatform.mm
branchJDK-8200758-branch
changeset 57099 9a85a7a076ad
parent 57064 a7fdadf67a92
child 57106 ea870b9ce89a
equal deleted inserted replaced
57098:fd4868c5fca1 57099:9a85a7a076ad
    81 
    81 
    82 TString MacPlatform::getTmpDirString() {
    82 TString MacPlatform::getTmpDirString() {
    83     return TString(MAC_JPACKAGE_TMP_DIR);
    83     return TString(MAC_JPACKAGE_TMP_DIR);
    84 }
    84 }
    85 
    85 
    86 void MacPlatform::reactivateAnotherInstance() {
       
    87     if (singleInstanceProcessId == 0) {
       
    88         printf("Unable to reactivate another instance, PID is undefined");
       
    89         return;
       
    90     }
       
    91     NSRunningApplication* app =
       
    92             [NSRunningApplication runningApplicationWithProcessIdentifier:
       
    93             singleInstanceProcessId];
       
    94     if (app != nil) {
       
    95         [app activateWithOptions: NSApplicationActivateIgnoringOtherApps];
       
    96     } else {
       
    97         printf("Unable to reactivate another instance PID: %d",
       
    98                 singleInstanceProcessId);
       
    99     }
       
   100 }
       
   101 
       
   102 TCHAR* MacPlatform::ConvertStringToFileSystemString(TCHAR* Source,
    86 TCHAR* MacPlatform::ConvertStringToFileSystemString(TCHAR* Source,
   103         bool &release) {
    87         bool &release) {
   104     TCHAR* result = NULL;
    88     TCHAR* result = NULL;
   105     release = false;
    89     release = false;
   106     CFStringRef StringRef = CFStringCreateWithCString(kCFAllocatorDefault,
    90     CFStringRef StringRef = CFStringCreateWithCString(kCFAllocatorDefault,