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

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()`.
(cherry picked from commit d25d4ee60c)

Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
This commit is contained in:
Miss Islington (bot) 2024-02-02 14:13:00 +01:00 committed by GitHub
parent 1eb791ce4f
commit e995c585e7
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 @@ class EditorWindow:
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)