Tk Source Code

View Ticket
Login
Ticket UUID: 220431
Title: Event loop freezes on standard dialogs
Type: Bug Version: obsolete: 8.0.4
Submitter: welch Created on: 2000-10-31 23:27:45
Subsystem: 33. Generic Dialog Support Assigned To: nobody
Priority: 2 Severity:
Status: Closed Last Modified: 2000-11-01 06:27:46
Resolution: Fixed Closed By: welch
    Closed on: 2000-10-31 23:27:46
Description:
OriginalBugID: 1212 Bug
Version: 8.0.4
SubmitDate: '1999-02-16'
LastModified: '2000-02-01'
Severity: MED
Status: Released
Submitter: pat
ChangedBy: hobbs
RelatedBugIDs: 715 830 2892
OS: All Windows
Machine: X86
FixedDate: '2000-02-01'
FixedInVersion: 8.3


Name:
Kevin B. Kenny

Extensions:
Tk 8.0.4 ; no other relevant extensions

CustomShell:
Script fails on an unmodified core release.

ReproducibleScript:
# If any of the standard dialogs comes up before the main window, the
# Tk application's event loop on Win95/98 fails to handle events on the
# main window and its children.  The following script illustrates the problem:

set fileTypes {
    {{All Files} *}
}
grid [text .t -font {Courier}]
grid [button .ok -text OK -command exit]
set fileName [tk_getOpenFile  -filetypes $fileTypes  -title "Select file to display"]
set f [open $fileName r]
while {[gets $f line] >= 0} {
    .t insert end $line {} \n
}
close $f

ObservedBehavior:
The main window is "dead."  Mouse clicks and keyboard actions anywhere
within the window and its descendants are ignored; for instance, clicking
the "OK" button does nothing.

DesiredBehavior:
The main window should respond normally after the file selection dialog
is dismissed.



Verified on 8.2.0. 
-- 08/20/1999 hobbs
A work-around is to call 'update' before the first call to
the dialog.  Problem only reproducable on Windows 
-- 08/20/1999 hobbs
The problem is actually restricted to the parent of the dialog
that pops up, and only when the dialog is created before the
parent is ever first mapped.  Windows would set it to disabled,
then Tk would create a new wrapper, for which Windows wouldn't
be aware, and you were left with a "disabled" toplevel.  This is
fixed in 8.3.0, for all native Windows dialogs. 
-- 02/01/2000 hobbs