fix error

This commit is contained in:
2025-07-07 21:39:16 +02:00
parent aeb00149c2
commit 40ada7f96d
+1 -1
View File
@@ -147,7 +147,7 @@ class MainWindow(QtWidgets.QMainWindow):
if w.title == selected_window: if w.title == selected_window:
win = w win = w
break break
if win is not None and win.isVisible: if win is not None and win.width > 0 and win.height > 0:
x, y, w_, h_ = win.left, win.top, win.width, win.height x, y, w_, h_ = win.left, win.top, win.width, win.height
screen = pyautogui.screenshot(region=(x, y, w_, h_)) screen = pyautogui.screenshot(region=(x, y, w_, h_))
offset_x, offset_y = x, y offset_x, offset_y = x, y