Tk Library Source Code

Artifact [5fd47af9e4]
Login

Artifact 5fd47af9e4a5f562f8ec552b60a382bab669cdb6:

Attachment "tkchatZoomWin.diff" to ticket [1187273fff] added by wildcard_25 2005-04-21 17:22:29.
Index: tkchat.tcl
===================================================================
RCS file: /cvsroot/tcllib/tclapps/apps/tkchat/tkchat.tcl,v
retrieving revision 1.275
diff -u -d -r1.275 tkchat.tcl
--- tkchat.tcl	13 Apr 2005 12:15:21 -0000	1.275
+++ tkchat.tcl	21 Apr 2005 10:10:39 -0000
@@ -5493,6 +5493,9 @@
         package require Winico
     }]} {
         variable TaskbarIcon
+        variable winicoZoomed
+
+        set winicoZoomed 0
         set icofile [file join [file dirname [info script]] tkchat.ico]
         if {[file exists $icofile]} {
             set TaskbarIcon [winico createfrom $icofile]
@@ -5512,13 +5515,22 @@
 }
 
 proc ::tkchat::WinicoCallback {msg icn} {
+    variable winicoZoomed
+
     switch -exact -- $msg {
         WM_LBUTTONDOWN {
             if {[wm state .] == "withdrawn"} {
+                if {$winicoZoomed} {
+                    wm state . zoomed
+                    set winicoZoomed 0
+                }
                 wm deiconify .
                 ResetMessageCounter
                 WinicoChatHook
             } else {
+                if {[wm state .] == "zoomed"} {
+                    set winicoZoomed 1
+                }
                 wm withdraw .
             }
         }