diff --git a/src/screen.py b/src/screen.py index 4a86ea1..299bf06 100644 --- a/src/screen.py +++ b/src/screen.py @@ -42,7 +42,7 @@ def convert_abs_to_monitor(abs_coord: Tuple[float, float]) -> Tuple[float, float def set_window_position(offset_x: int, offset_y: int): global monitor_roi, monitor_x_range, monitor_y_range, found_offsets - if monitor_roi["top"] == offset_y and monitor_roi["left"] == offset_x: + if found_offsets and monitor_roi["top"] == offset_y and monitor_roi["left"] == offset_x: return Logger.debug(f"Set offsets: left {offset_x}px, top {offset_y}px") monitor_roi["top"] = offset_y