Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5e6201e

Browse files
committed
Merge with 3.4
2 parents 5b1640c + 3c7eccd commit 5e6201e

2 files changed

Lines changed: 13 additions & 5 deletions

File tree

Lib/idlelib/EditorWindow.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,13 +175,13 @@ def __init__(self, flist=None, filename=None, key=None, root=None):
175175
if macosxSupport.isAquaTk():
176176
# Command-W on editorwindows doesn't work without this.
177177
text.bind('<<close-window>>', self.close_event)
178-
# Some OS X systems have only one mouse button,
179-
# so use control-click for pulldown menus there.
180-
# (Note, AquaTk defines <2> as the right button if
181-
# present and the Tk Text widget already binds <2>.)
178+
# Some OS X systems have only one mouse button, so use
179+
# control-click for popup context menus there. For two
180+
# buttons, AquaTk defines <2> as the right button, not <3>.
182181
text.bind("<Control-Button-1>",self.right_menu_event)
182+
text.bind("<2>", self.right_menu_event)
183183
else:
184-
# Elsewhere, use right-click for pulldown menus.
184+
# Elsewhere, use right-click for popup menus.
185185
text.bind("<3>",self.right_menu_event)
186186
text.bind("<<cut>>", self.cut)
187187
text.bind("<<copy>>", self.copy)

Lib/idlelib/PyShell.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1547,6 +1547,14 @@ def main():
15471547
root.withdraw()
15481548
flist = PyShellFileList(root)
15491549
macosxSupport.setupApp(root, flist)
1550+
1551+
if macosxSupport.isAquaTk():
1552+
# There are some screwed up <2> class bindings for text
1553+
# widgets defined in Tk which we need to do away with.
1554+
# See issue #24801.
1555+
root.unbind_class('Text', '<B2>')
1556+
root.unbind_class('Text', '<B2-Motion>')
1557+
root.unbind_class('Text', '<<PasteSelection>>')
15501558

15511559
if enable_edit:
15521560
if not (cmd or script):

0 commit comments

Comments
 (0)