Terry J. Reedy <tjre...@udel.edu> added the comment:

I wrote the following justification for adding grab_release while Tal was 
revising his PR to make the change.  I will look at the PR now and test on 
Windows.
---

Vlad, I was wondering about modality.  Properly de-modalizing a dialog requires 
more than just removing grab_set.  The parent of a modal dialog is a window 
with a menu, an instance of idlelib.  If a dialog were not modal, its parent 
could be deleted, which would also delete the dialog and any un-saved and 
un-acted-upon data.  This is true of Debugger, whose parent is Shell.  
Duplicate dialogs would also be possible, as is true of IDLE Help, whose parent 
is root, unless explicitly prevented, as is true of Debugger (Shell knows if 
there is a Debugger instance).

Removing modality has been discussed in various places, such as in #24760, 
which focuses on Settings.  If it were de-modalized, its parent should be root 
and only one copy allowed.  Mark Roseman noted on the issue that "because modal 
doesn't fully work on the Mac, you can actually create multiple copies of the 
config dialog!".

So my preferred short-term fix, once confirmed, for 3.7.1, would be the 
addition of grab_release.

Merely removing grab would have to be Mac-specific, and I would expect new 
problems and complaints.  Properly de-modalizing on all platforms, where 
sensible, is a longer-term project.  Notepad++ on Windows, for instance, has a 
non-modal singleton Find dialog (with Replace and Find in Files on separate 
tabs), designed as such, that operates on the 'current' editor tab, unless one 
selects 'Find All in All Open Documents' to work on all of them.

PS: Tal Einat also get 'autorelease pool' errors when trying to run IDLE on 
locally built 3.7.0.

----------
dependencies:  -Problems with tkinter and tk8.6 on MacOS
versions:  -Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34120>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to