Skip to content

Commit 6eb8e4e

Browse files
committed
Pre-release tested OK in Windows and Linux (not Wayland). macOS in multi-monitor setups, pending.
1 parent bcf9e65 commit 6eb8e4e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/test_pywinbox.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import subprocess
77
import sys
88
import time
9+
from typing import Tuple, cast
910

1011
import pywinbox
1112
import pywinctl
@@ -49,11 +50,11 @@ def test_basic():
4950
npw.restore(wait=wait)
5051
assert not npw.isMaximized
5152

52-
handle = npw.getHandle()
53-
if sys.platform == "darwin" and pywinctl.version() < "0.1":
54-
handle = (npw.getAppName(), npw.title)
53+
if sys.platform == "darwin":
54+
myPyBox = pywinbox.PyWinBox(onQuery=pywinbox.defaultOnQuery, onSet=pywinbox.defaultOnSet, handle=(npw.getAppName(), npw.title))
55+
else:
56+
myPyBox = pywinbox.PyWinBox(onQuery=pywinbox.defaultOnQuery, onSet=pywinbox.defaultOnSet, handle=npw.getHandle())
5557

56-
myPyBox = pywinbox.PyWinBox(onQuery=pywinbox.defaultOnQuery, onSet=pywinbox.defaultOnSet, handle=handle)
5758

5859
myPyBox.left = 250
5960
time.sleep(timelap)

0 commit comments

Comments
 (0)