Index: libwnck/window-action-menu.c
===================================================================
RCS file: /cvs/gnome/libwnck/libwnck/window-action-menu.c,v
retrieving revision 1.11
diff -u -r1.11 window-action-menu.c
--- libwnck/window-action-menu.c	6 Jan 2004 06:38:34 -0000	1.11
+++ libwnck/window-action-menu.c	9 Mar 2004 16:44:27 -0000
@@ -199,7 +199,29 @@
   amd->idle_handler = 0;
   
   actions = wnck_window_get_actions (amd->window);
-  
+
+  /* First, remove items that don't make sense if the window is minimized. */
+  if (wnck_window_is_minimized (amd->window))
+    {
+      actions &= ~WNCK_WINDOW_ACTION_MOVE;
+
+      actions &= ~WNCK_WINDOW_ACTION_RESIZE;
+
+      actions &= ~(WNCK_WINDOW_ACTION_SHADE |
+                   WNCK_WINDOW_ACTION_UNSHADE);
+
+      actions &= ~(WNCK_WINDOW_ACTION_MAXIMIZE_HORIZONTALLY |
+                   WNCK_WINDOW_ACTION_UNMAXIMIZE_HORIZONTALLY);
+
+      actions &= ~(WNCK_WINDOW_ACTION_MAXIMIZE_VERTICALLY |
+                   WNCK_WINDOW_ACTION_UNMAXIMIZE_VERTICALLY);
+
+      actions &= ~(WNCK_WINDOW_ACTION_MAXIMIZE   |
+                   WNCK_WINDOW_ACTION_UNMAXIMIZE);
+    }
+
+
+  /* Now determine the names of the items in the menu and their sensitivity. */
   if (wnck_window_is_minimized (amd->window))
     {
       set_item_text (amd->minimize_item, _("Unmi_nimize"));
