rules: fix bug in xtest mouse scrolling

This commit is contained in:
Peter F. Patel-Schneider 2022-04-18 08:17:41 -04:00
parent dc12547c00
commit 9ed76b24fb
1 changed files with 2 additions and 2 deletions

View File

@ -322,9 +322,9 @@ def simulate_scroll(dx, dy):
if not wayland and xtest_available: if not wayland and xtest_available:
success = True success = True
if dx: if dx:
success = click(7 if dx > 0 else 6, count=abs(dx)) success = click_xtest(buttons['scroll_right' if dx > 0 else 'scroll_left'], count=abs(dx))
if dy and success: if dy and success:
success = click(4 if dy > 0 else 5, count=abs(dy)) success = click_xtest(buttons['scroll_up' if dy > 0 else 'scroll_down'], count=abs(dy))
if success: if success:
return True return True
if setup_uinput(): if setup_uinput():