blob: bd1b80fe726e2a7808381f317c2a6417d56934f4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
#include "processhandle.h"
#import <AppKit/AppKit.h>
namespace Utils {
bool ProcessHandle::activate()
{
NSRunningApplication *app = [NSRunningApplication
runningApplicationWithProcessIdentifier:pid()];
return app && [app activateWithOptions:static_cast<NSApplicationActivationOptions>(
NSApplicationActivateIgnoringOtherApps)];
}
} // Utils
|