gh-103820: IDLE: Do not interpret buttons 4/5 as scrolling on non-X11 (GH-103821)

Also fix test_mousewheel: do not skip a check which was broken due to incorrect
delta on Aqua and XQuartz, and probably not because of `.update_idletasks()`.
This commit is contained in:
Christopher Chavez 2024-02-02 04:38:43 -06:00 committed by GitHub
parent 53339a0ef7
commit d25d4ee60c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 26 additions and 15 deletions

View file

@ -166,8 +166,9 @@ def __init__(self, flist=None, filename=None, key=None, root=None):
text.bind("<3>",self.right_menu_event)
text.bind('<MouseWheel>', wheel_event)
text.bind('<Button-4>', wheel_event)
text.bind('<Button-5>', wheel_event)
if text._windowingsystem == 'x11':
text.bind('<Button-4>', wheel_event)
text.bind('<Button-5>', wheel_event)
text.bind('<Configure>', self.handle_winconfig)
text.bind("<<cut>>", self.cut)
text.bind("<<copy>>", self.copy)