[New-bugs-announce] [issue26340] modal dialog with transient method; parent window fails to iconify

vs report at bugs.python.org
Thu Feb 11 12:05:42 EST 2016

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()

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

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 <report at bugs.python.org>

More information about the New-bugs-announce mailing list