diff options
author | fvogel <fvogelnew1@free.fr> | 2023-07-25 20:00:32 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2023-07-25 20:00:32 (GMT) |
commit | f4908ad6483be0c228a30c0aad4d254a1f967130 (patch) | |
tree | 607828beef735b3a13915ba102ebaf736743b3b0 /library/systray.tcl | |
parent | 4fda834f2386fce94a5085984dbc052ff5040b56 (diff) | |
download | tk-f4908ad6483be0c228a30c0aad4d254a1f967130.zip tk-f4908ad6483be0c228a30c0aad4d254a1f967130.tar.gz tk-f4908ad6483be0c228a30c0aad4d254a1f967130.tar.bz2 |
Take into account that the notify window may be deleted during fade-in or fade-out.
Diffstat (limited to 'library/systray.tcl')
-rw-r--r-- | library/systray.tcl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/systray.tcl b/library/systray.tcl index b0dc737..ada0721 100644 --- a/library/systray.tcl +++ b/library/systray.tcl @@ -195,6 +195,7 @@ namespace eval ::tk::sysnotify:: { # Fade the window into view. proc _fadeIn {w} { variable defaults + if {![winfo exists $w]} {return} if {[set alpha [option get $w alpha ""]] eq ""} { set alpha [dict get $defaults alpha] } @@ -212,6 +213,7 @@ namespace eval ::tk::sysnotify:: { # Fade out and destroy window. proc _fadeOut {w} { + if {![winfo exists $w]} {return} set before [wm attributes $w -alpha] set new [expr { $before - 0.02 }] wm attributes $w -alpha $new |