From 73f85b24914227a140e40c5c8bb7eb6efa7a41b2 Mon Sep 17 00:00:00 2001 From: luoyu Date: Mon, 9 Dec 2024 10:02:15 +0800 Subject: [PATCH] Fixed an issue where the cursor was redirected to other screens when using multiple screens --- core/buffer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/buffer.py b/core/buffer.py index b89ce8059..3b962cade 100755 --- a/core/buffer.py +++ b/core/buffer.py @@ -208,11 +208,11 @@ def move_cursor_to_corner(self): ''' screen = QApplication.instance().primaryScreen() # type: ignore try: - QCursor().setPos(screen, screen.size().width(), screen.size().height()) + QCursor().setPos(screen, screen.size().width() - 1, screen.size().height() - 1) except: # Moves the cursor the primary screen to the global screen position (x, y). # Sometimes, setPos(QScreen, Int, Int) API don't exists. - QCursor().setPos(screen.size().width(), screen.size().height()) + QCursor().setPos(screen.size().width() - 1, screen.size().height() - 1) def set_aspect_ratio(self, aspect_ratio): ''' Set aspect ratio.'''