@@ -328,7 +328,7 @@ def getWindowsAt(x: int, y: int, allWindows: Optional[List[MacOSWindow]] = None)
328
328
if pointInBox (x , y , box )]
329
329
330
330
331
- def getTopWindowAt (x : int , y : int , allWindows : Optional [List [MacOSWindow ]] = None ) -> MacOSWindow :
331
+ def getTopWindowAt (x : int , y : int , allWindows : Optional [List [MacOSWindow ]] = None ) -> Optional [ MacOSWindow ] :
332
332
"""
333
333
Get *a* Window object at the point ``(x, y)`` on screen.
334
334
Which window is not guaranteed. See https://github.com/Kalmat/PyWinCtl/issues/20#issuecomment-1193348238
@@ -429,7 +429,7 @@ def __init__(self, app: AppKit.NSRunningApplication, title: str):
429
429
self ._appName : str = self .getProcName (self ._appPID )
430
430
if not self ._appName :
431
431
# localizedName() is not recognized in AppleScript for non-English languages
432
- self ._appName : str = app .localizedName ()
432
+ self ._appName = app .localizedName ()
433
433
self ._initTitle : str = title
434
434
self ._winTitle : str = title
435
435
# self._parent = self.getParent() # It is slow and not required by now
@@ -1230,7 +1230,7 @@ def visible(self) -> bool:
1230
1230
1231
1231
:return: ``True`` if the window is currently visible
1232
1232
"""
1233
- return self ._winTitle and self ._winTitle in _getAppWindowsTitles (self ._app )
1233
+ return bool ( self ._winTitle and self ._winTitle in _getAppWindowsTitles (self ._app ) )
1234
1234
1235
1235
isVisible : bool = cast (bool , visible ) # isVisible is an alias for the visible property.
1236
1236
0 commit comments