This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: IDLE: debugger context menus not working on Mac
Type: behavior Stage: resolved
Components: IDLE Versions: Python 3.6, Python 3.4, Python 3.5, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: kbk, markroseman, ned.deily, python-dev, roger.serwy, terry.reedy
Priority: normal Keywords: patch

Created on 2015-09-02 23:10 by markroseman, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
debug-mac-context-menu.patch markroseman, 2015-09-02 23:10 review
Messages (8)
msg249582 - (view) Author: Mark Roseman (markroseman) * Date: 2015-09-02 23:10
Right menu button to invoke context menu (as well as alternative control-click) not set up correctly for Mac in the debugger. Patch attached.
msg249595 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2015-09-03 02:53
Ned, can you check this Idle-Mac patch?

I presume the same code is used elsewhere.  It might be nice to encapsulate it sometime, though I am not sure where to put a context-bind function.
msg249597 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2015-09-03 02:55
'Goto source line' works on Win7.  Show stackframe does not do anything that I can see, and seems perhaps redundant.
msg249670 - (view) Author: Mark Roseman (markroseman) * Date: 2015-09-03 16:42
Terry, the new code I've proposed includes a "tkextras" module that is a good place for these sort of little convenience functions.
msg249679 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2015-09-03 17:56
The standard on Windows is to bring up a context menu on right-button-release, not on r-b-press.  What about linux and mac?  

Thunderbird and Notepad++ move the insertion cursor on rb-press, That is the paste position even if the mouse is moved before release. Notepad does not move the insert cursor. MS Word is confusing, erasing the cursor when the menu is displayed and moving it when the menu goes away.

EditorWindow.py has this code for context menu event binding:

        if macosxSupport.isAquaTk():
            # Some OS X systems have only one mouse button,
            # so use control-click for pulldown menus there.
            #  (Note, AquaTk defines <2> as the right button if
            #   present and the Tk Text widget already binds <2>.)
            text.bind("<Control-Button-1>",self.right_menu_event)
        else:
            # Elsewhere, use right-click for pulldown menus.
            text.bind("<3>",self.right_menu_event)

Testing with my middle button, a press and release act the same as left click to move the insertion cursor to the mouse cursor. Moving my mouse while holding the middle button down moves the text pane within the text window. The insertion cursor is not moved. This is pretty much redundant with using the scroll wheel or scroll bar.

Would it confuse Mac users to have rt-click for context menu only work in debugger?  Could we make rt-click work in editor windows by recording position or time on press and compare position or time on release?
msg249680 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2015-09-03 18:16
I just found #24801 which addressed the editor issue.
msg251667 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-09-26 22:51
New changeset bf11034f0291 by Terry Jan Reedy in branch '2.7':
Issue #24988: Idle ScrolledList context menus (used in debugger)
https://hg.python.org/cpython/rev/bf11034f0291

New changeset 85a4c95ad02f by Terry Jan Reedy in branch '3.4':
Issue #24988: Idle ScrolledList context menus (used in debugger)
https://hg.python.org/cpython/rev/85a4c95ad02f
msg251670 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2015-09-26 23:16
Opened #25244 to consider changing exact right-click behavior.
History
Date User Action Args
2022-04-11 14:58:20adminsetgithub: 69176
2015-09-26 23:16:50terry.reedysetassignee: terry.reedy
2015-09-26 23:16:39terry.reedysetstatus: open -> closed
resolution: fixed
messages: + msg251670

stage: patch review -> resolved
2015-09-26 22:51:28python-devsetnosy: + python-dev
messages: + msg251667
2015-09-03 18:16:36terry.reedysetmessages: + msg249680
2015-09-03 17:56:08terry.reedysetmessages: + msg249679
2015-09-03 16:42:29markrosemansetmessages: + msg249670
2015-09-03 02:55:14terry.reedysetmessages: + msg249597
2015-09-03 02:53:04terry.reedysetnosy: + ned.deily

messages: + msg249595
stage: patch review
2015-09-02 23:10:11markrosemancreate