Updated 2014-02-03 22:55:14 by RLE

Use <Unmap> and <Map>:
    bind . <Unmap> {puts "Someone just iconified me."}

More sophisticated programming recognizes "that toplevel bindings apply to every child widget, so you should also test that the widget is a toplevel" and moreover that "Unmap will also happen when you switch desktops, so you have to ... test the state" (in the words of Donald Arseneau ...):
    bind . <Unmap> {unmapper %W}

    proc unmapper {  W } {
       if {[string equal [winfo toplevel $W] $W] && 
           [string equal [wm state $W] iconic]} {
           puts "Minimizing $W."

Bruce Hartweg adds ..., "Also note that with some WMs the multidesktop is handled the same as an iconify, so you still might get 'false' hits" (Donald Arseneau: Really? Do any fail the "wm state = iconic" test?)

pdt Yes, switching between virtual screens with Linux (Debian 7.3 with XFCE), wm state returns iconic.