mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
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:
parent
53339a0ef7
commit
d25d4ee60c
4 changed files with 26 additions and 15 deletions
|
@ -285,8 +285,9 @@ class TreeNode:
|
|||
self.label.bind("<1>", self.select_or_edit)
|
||||
self.label.bind("<Double-1>", self.flip)
|
||||
self.label.bind("<MouseWheel>", lambda e: wheel_event(e, self.canvas))
|
||||
self.label.bind("<Button-4>", lambda e: wheel_event(e, self.canvas))
|
||||
self.label.bind("<Button-5>", lambda e: wheel_event(e, self.canvas))
|
||||
if self.label._windowingsystem == 'x11':
|
||||
self.label.bind("<Button-4>", lambda e: wheel_event(e, self.canvas))
|
||||
self.label.bind("<Button-5>", lambda e: wheel_event(e, self.canvas))
|
||||
self.text_id = id
|
||||
|
||||
def select_or_edit(self, event=None):
|
||||
|
@ -460,8 +461,9 @@ class ScrolledCanvas:
|
|||
self.canvas.bind("<Key-Up>", self.unit_up)
|
||||
self.canvas.bind("<Key-Down>", self.unit_down)
|
||||
self.canvas.bind("<MouseWheel>", wheel_event)
|
||||
self.canvas.bind("<Button-4>", wheel_event)
|
||||
self.canvas.bind("<Button-5>", wheel_event)
|
||||
if self.canvas._windowingsystem == 'x11':
|
||||
self.canvas.bind("<Button-4>", wheel_event)
|
||||
self.canvas.bind("<Button-5>", wheel_event)
|
||||
#if isinstance(master, Toplevel) or isinstance(master, Tk):
|
||||
self.canvas.bind("<Alt-Key-2>", self.zoom_height)
|
||||
self.canvas.focus_set()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue