Skip to content

Commit

Permalink
v0.7 pre-release
Browse files Browse the repository at this point in the history
  • Loading branch information
Kalmat committed Mar 26, 2024
1 parent 3b22bf8 commit 34b628d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,9 @@ or

python3 -m pip install pywinctl

Alternatively, you can download the wheel file (.whl) available in the [Download page](https://pypi.org/project/PyWinCtl/#files) and the [dist folder](https://github.com/Kalmat/PyWinCtl/tree/master/dist), and run this (don't forget to replace 'x.x.xx' with proper version number):
Alternatively, you can download the wheel file (.whl) available in the [Download page](https://pypi.org/project/PyWinCtl/#files) and run this (don't forget to replace 'x.xx' with proper version number):

pip install PyWinCtl-x.x.xx-py3-none-any.whl
pip install PyWinCtl-x.xx-py3-none-any.whl

You may want to add `--force-reinstall` option to be sure you are installing the right dependencies version.

Expand Down
5 changes: 2 additions & 3 deletions src/pywinctl/_pywinctl_macos.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ def __init__(self, app: AppKit.NSRunningApplication, title: str):
self._appName: str = self.getProcName(self._appPID)
if not self._appName:
# localizedName() is not recognized in AppleScript for non-English languages
self._appName: str = app.localizedName()
self._appName = app.localizedName()
self._initTitle: str = title
self._winTitle: str = title
# self._parent = self.getParent() # It is slow and not required by now
Expand Down Expand Up @@ -1301,8 +1301,7 @@ def visible(self) -> bool:
:return: ``True`` if the window is currently visible
"""
return self._winTitle and self._winTitle in _getAppWindowsTitles(self._app)

return bool(self._winTitle and self._winTitle in _getAppWindowsTitles(self._app))
isVisible: bool = cast(bool, visible) # isVisible is an alias for the visible property.

@property
Expand Down
2 changes: 1 addition & 1 deletion src/pywinctl/_pywinctl_win.py
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ def isParent(self, child: int) -> bool:
:param child: handle of the window you want to check if the current window is parent of
:return: ''True'' if current window is parent of the given window
"""
return child and win32gui.GetParent(child) == self._hWnd
return bool(child and win32gui.GetParent(child) == self._hWnd)
isParentOf = isParent # isParentOf is an alias of isParent method

def isChild(self, parent: int) -> bool:
Expand Down

0 comments on commit 34b628d

Please sign in to comment.