--- tcl/end.tcl.orig	2011-02-07 20:39:07.000000000 +1000
+++ tcl/end.tcl	2011-02-07 21:08:43.000000000 +1000
@@ -1747,8 +1747,8 @@
 bind $dot_w <Configure> "recordWinSize $dot_w"
 
 # Bindings to map/unmap all windows when main window is mapped:
-bind .main.statusbar <Map> { showHideAllWindows deiconify}
-bind .main.statusbar <Unmap> { showHideAllWindows iconify}
+bind .fdockmain <Map> { raiseAllWindows}
+bind .fdockmain <Unmap> { showHideAllWindows iconify}
 
 ################################################################################
 # returns a list of all toplevel windows, except some that are utilities
@@ -1781,7 +1781,9 @@
   # Some window managers like KDE generate Unmap events for other
   # situations like switching to another desktop, etc.
   # So if the main window is still mapped, do not iconify others:
-  if {($type == "iconify")  && ([winfo ismapped .main] == 1)} { return }
+  ## seems busted , so try something different
+
+  if {($type == "iconify")  && ([winfo ismapped .] == 1)} { return }
   
   # Now iconify/deiconify all the major Scid windows that exist:
   foreach w [getTopLevel] {
@@ -1790,7 +1792,8 @@
     # .playerInfoWin .commentWin .repWin .statsWin .tbWin \
     # .sb .sh .sm .noveltyWin .emailWin .oprepWin .plist \
     # .rgraph .sgraph .importWin .helpWin .tipsWin
-    if {[winfo exists $w]} { catch {wm $type $w} }
+    # seems some bug here with ctxtmenu, so exlcude it
+    if {[winfo exists $w] && $w != {.ctxtMenu}} { catch {wm $type $w} }
   }
   
 }
