From 972a18a518b8a38ff80171dab51eae0981133949 Mon Sep 17 00:00:00 2001 From: "Evgeny.Terekhin" Date: Wed, 3 Jul 2024 07:52:33 +0200 Subject: [PATCH] Pass pid as Int to satisfy NSRunningApplication.runningApplicationWithProcessIdentifier (cherry picked from commit ea487852c895980db0941b202d40b742ea623086) IJ-MR-138589 GitOrigin-RevId: b7ee858d9a606d8f573c99ab6e24678711c0e9d3 --- .../to/foreground/MacBringProcessWindowToForegroundSupport.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/platform-impl/src/com/intellij/execution/process/window/to/foreground/MacBringProcessWindowToForegroundSupport.kt b/platform/platform-impl/src/com/intellij/execution/process/window/to/foreground/MacBringProcessWindowToForegroundSupport.kt index 22b58a4ee784..992e1079293a 100644 --- a/platform/platform-impl/src/com/intellij/execution/process/window/to/foreground/MacBringProcessWindowToForegroundSupport.kt +++ b/platform/platform-impl/src/com/intellij/execution/process/window/to/foreground/MacBringProcessWindowToForegroundSupport.kt @@ -6,7 +6,8 @@ import com.intellij.ui.mac.foundation.Foundation internal class MacBringProcessWindowToForegroundSupport : BringProcessWindowToForegroundSupport { override fun bring(pid: UInt): Boolean { val nsRunningApplicationClass = Foundation.getObjcClass("NSRunningApplication") - val nsApplication = Foundation.invoke(nsRunningApplicationClass, "runningApplicationWithProcessIdentifier:", pid) + val macAcceptableIntPid = pid.toInt() + val nsApplication = Foundation.invoke(nsRunningApplicationClass, "runningApplicationWithProcessIdentifier:", macAcceptableIntPid) return Foundation.invoke(nsApplication, "activateWithOptions:", 1).booleanValue() } } \ No newline at end of file