Tk Source Code

View Ticket
Login
Ticket UUID: 220108
Title: bug in wm callbacks?
Type: Bug Version: obsolete: 8.0p2
Submitter: welch Created on: 2000-10-31 22:36:00
Subsystem: 65. Generic Window Operations Assigned To: nobody
Priority: 1 Zero Severity:
Status: Closed Last Modified: 2000-11-01 05:36:00
Resolution: Invalid Closed By: welch
    Closed on: 2000-10-31 22:36:00
Description:
OriginalBugID: 643 Bug
Version: 8.0p2
SubmitDate: '1998-05-25'
LastModified: '1999-08-15'
Severity: LOW
Status: Closed
Submitter: hershey
ChangedBy: hobbs
OS: All Windows
OSVersion: NA
Machine: NA
FixedInVersion: NA
ClosedDate: '1999-08-15'


I noticed the following behavior in tcl8.0p2.
When binding to Destroy  or using
wm protocol WM_DELETE_WINDOW,
in the callback, [winfo viewable $window] == 1,
even though [winfo exists $win] == 0. This would
be meaningful if one were saving the geometry of
the window and wanted to test for its presence before
saving.

A workaround is to
catch "wm geometry $win" var, but I didn't think it logical
that the window could not exist, yet still be viewable.

From: Robert Karen <[email protected]>

This is the desired behavior.  There was previously a bug where
the winfo exists would actually return 1, which could really
cause confusion and problems.  What is occuring is that the window
is in the middle of being destroyed.  Since total destruction is
imminent, exists is made to return 0.  However, the window is
still (for the moment) physically viewable.

If you throw some after calls in there, you will see that the
window is still viewable, but interacting with it is not fully
enabled because it is in the destruction process. 
-- 08/15/1999 hobbs