diff options
Diffstat (limited to 'base/mac_util.mm')
-rw-r--r-- | base/mac_util.mm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/base/mac_util.mm b/base/mac_util.mm index 3ffab82..de07c88 100644 --- a/base/mac_util.mm +++ b/base/mac_util.mm @@ -178,4 +178,14 @@ void GrabWindowSnapshot(NSWindow* window, } } +void ActivateProcess(pid_t pid) { + ProcessSerialNumber process; + OSStatus status = GetProcessForPID(pid, &process); + if (status == noErr) { + SetFrontProcess(&process); + } else { + LOG(WARNING) << "Unable to get process for pid " << pid; + } +} + } // namespace mac_util |