Tk Source Code

View Ticket
Login
Ticket UUID: 220181
Title: Exit Window
Type: Bug Version: obsolete: 8.1b3
Submitter: welch Created on: 2000-10-31 22:42:02
Subsystem: 65. Generic Window Operations Assigned To: nobody
Priority: 1 Zero Severity:
Status: Closed Last Modified: 2001-04-26 04:17:21
Resolution: Invalid Closed By: dgp
    Closed on: 2001-04-25 21:17:21
Description:
OriginalBugID: 1921 Bug
Version: 8.1b3
SubmitDate: '1999-04-22'
LastModified: '1999-08-08'
Severity: SER
Status: Closed
Submitter: pat
ChangedBy: hobbs
OS: Windows 95
OSVersion: NA
Machine: NA
FixedInVersion: NA
ClosedDate: '1999-08-08'


Name:  Chang LI
email:  [email protected]
Support:  None
Severity:  2
OperatingSystem:  Windows 95
Synopsis:  Exit Window

ReproducibleScript:
    Click the exit button on the title bar of Tk Window cause system error.
    It just exit the entire process. Suppose we have a main process, and it
    open a Tk window, when this Tk window exit, we require it only destroy
    its own window. But current Tk implementation kill the main process
    either.
    And you have to keep a Tk window in active. You can not destroy it. 
    This is not the case of Tk8.0. 
    
    The thread code of Tk8.1b3 may cause this clearnup problem althought I
    did
    not enable the thread. 
    

ObservedBehavior:
    When you run wish81 there is another Tk window. When you click the exit
    button
    on the title bar of the Tk window, you should not kill the wish81
    console
    window itself. 
    

Patch:
Maybe you can use the DeleteWindowsExitProc(NULL) replaces the ExitProcess.
Posted To comp.lang.tcl: Posted Successfully



The behavior observed is correct.  Kiiling the '.' (main) toplevel
window is synonymous with exit in wish in the main interpreter.
If the user wants to catch this, they need:
  wm protocol . WM_DELETE_WINDOW <SaveMeProc> 
-- 08/08/1999 hobbs