Skip to content

Commit

Permalink
Fixed an issue where the cursor was redirected to other screens when …
Browse files Browse the repository at this point in the history
…using multiple screens
  • Loading branch information
luoyu authored and manateelazycat committed Dec 9, 2024
1 parent c7127a0 commit 73f85b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.'''
Expand Down

0 comments on commit 73f85b2

Please sign in to comment.