diff --git a/dist/PyWinCtl-dev0.1-py3-none-any.whl b/dist/PyWinCtl-dev0.1-py3-none-any.whl index c6e57c2..c9f1e9e 100644 Binary files a/dist/PyWinCtl-dev0.1-py3-none-any.whl and b/dist/PyWinCtl-dev0.1-py3-none-any.whl differ diff --git a/src/pywinctl/_main.py b/src/pywinctl/_main.py index 8060538..a0290ac 100644 --- a/src/pywinctl/_main.py +++ b/src/pywinctl/_main.py @@ -863,7 +863,10 @@ def restart( def _findMonitorName(x: int, y: int): monitors = pmc.findMonitor(x, y) - return [monitor.name for monitor in monitors] + if monitors: + return [monitor.name for monitor in monitors] + else: + return [] def getAllScreens():