New submission from vs:

Consider the following code implementing a custom modal dialog:

from Tkinter import *

def dialog():
    win = Toplevel()
    Label(win, text='Modal Dialog').pack()
    win.transient(win.master)
    win.focus_set()
    win.grab_set()
    win.wait_window()

root = Tk()
Button(root, text='Custom Dialog', command=dialog).pack()
root.mainloop()

In Python 2.7.3, the parent window behaves as expected when the modal dialog is 
active. That is, the parent window responds to minimize, maximize, and close 
events. The modal dialog window iconifies and closes together with the parent 
window. If a user presses Show Desktop button in Windows OS, the parent and the 
dialog iconify together and can be restored from the Taskbar.

However, in more recent Python releases (I tested 2.7.8, 2.7.11 and 3.5.1), the 
parent window does not respond to any of the three window commands. If the 
modal dialog is open and the user presses Show Desktop, both windows iconify, 
but they CANNOT be restored or closed from the Taskbar. The only way to close 
such an application is to kill it through the Task Manager.

----------
components: Tkinter, Windows
messages: 260114
nosy: paul.moore, steve.dower, tim.golden, vs, zach.ware
priority: normal
severity: normal
status: open
title: modal dialog with transient method; parent window fails to iconify
type: behavior
versions: Python 2.7, Python 3.5

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

Reply via email to