summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/editor.py
diff options
context:
space:
mode:
authorChristopher Chavez <chrischavez@gmx.us>2024-02-02 10:38:43 (GMT)
committerGitHub <noreply@github.com>2024-02-02 10:38:43 (GMT)
commitd25d4ee60cc789a8b9c222859bb720ade1ab2e30 (patch)
tree177adef01e1bb60ff9955802fc67ee08b642c9ac /Lib/idlelib/editor.py
parent53339a0ef72fcfc15221792b117c4670b07a0b20 (diff)
downloadcpython-d25d4ee60cc789a8b9c222859bb720ade1ab2e30.zip
cpython-d25d4ee60cc789a8b9c222859bb720ade1ab2e30.tar.gz
cpython-d25d4ee60cc789a8b9c222859bb720ade1ab2e30.tar.bz2
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()`.
Diffstat (limited to 'Lib/idlelib/editor.py')
-rw-r--r--Lib/idlelib/editor.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/idlelib/editor.py b/Lib/idlelib/editor.py
index 6ad383f..8ee8eba 100644
--- a/Lib/idlelib/editor.py
+++ b/Lib/idlelib/editor.py
@@ -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)