fix error
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user