diff --git a/src/pywinctl/_pywinctl_linux.py b/src/pywinctl/_pywinctl_linux.py index 2ac7c0f..26b2f0a 100644 --- a/src/pywinctl/_pywinctl_linux.py +++ b/src/pywinctl/_pywinctl_linux.py @@ -799,9 +799,9 @@ def getHandle(self) -> int: def getPID(self) -> Optional[int]: """ - Get the current application PID + Get the current application PID the window belongs to - :return: application PID + :return: application PID or None if it couldn't be retrieved """ return self._win.getPid() diff --git a/src/pywinctl/_pywinctl_macos.py b/src/pywinctl/_pywinctl_macos.py index 7ac8532..27bc5ad 100644 --- a/src/pywinctl/_pywinctl_macos.py +++ b/src/pywinctl/_pywinctl_macos.py @@ -1143,9 +1143,9 @@ def getHandle(self) -> Tuple[str, str]: def getPID(self) -> Optional[int]: """ - Get the current application PID + Get the current application PID the window belongs to - :return: application PID + :return: application PID or None if it couldn't be retrieved """ cmd = """osascript -s 's' -e 'tell application "System Events" set appPID to "0" diff --git a/src/pywinctl/_pywinctl_win.py b/src/pywinctl/_pywinctl_win.py index 4bbe6e4..6b98813 100644 --- a/src/pywinctl/_pywinctl_win.py +++ b/src/pywinctl/_pywinctl_win.py @@ -886,9 +886,9 @@ def getHandle(self) -> int: def getPID(self) -> Optional[int]: """ - Get the current application PID + Get the current application PID the window belongs to - :return: application PID + :return: application PID or None if it couldn't be retrieved """ ret = win32process.GetWindowThreadProcessId(self._hWnd) if ret and len(ret) > 1: