We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4a6182f commit 7e9dfdeCopy full SHA for 7e9dfde
lolbot/system/windows/window.py
@@ -15,8 +15,8 @@ class WindowNotFound(Exception):
15
16
def check_window_exists(window_name: str):
17
if FindWindow(None, window_name) == 0:
18
- return False
19
- raise WindowNotFound
+ raise WindowNotFound
+ return True
20
21
22
def get_window_size(window_name: str):
@@ -30,6 +30,6 @@ def get_window_size(window_name: str):
30
31
def convert_ratio(ratio: tuple, window_name: str):
32
x, y, l, h = get_window_size(window_name)
33
- updated_x = (l * ratio[0]) + x
34
- updated_y = (h * ratio[1]) + y
+ updated_x = ((l - x) * ratio[0]) + x
+ updated_y = ((h - y) * ratio[1]) + y
35
return updated_x, updated_y
0 commit comments