]> Dogcows Code - chaz/openbox/blobdiff - openbox/client_menu.c
set a OB_ICONIFY_ALPHA define in misc.h for the 3 places to all use
[chaz/openbox] / openbox / client_menu.c
index 13a73d0554b149f16f0a45e4db95aa98b26e8bfa..f538eafd7f36ae263a81e2feecd8bba0f932073a 100644 (file)
@@ -24,6 +24,7 @@
 #include "openbox.h"
 #include "frame.h"
 #include "moveresize.h"
+#include "event.h"
 #include "prop.h"
 #include "gettext.h"
 
@@ -90,7 +91,7 @@ static gboolean client_menu_update(ObMenuFrame *frame, gpointer data)
                 *en = c->functions & OB_CLIENT_FUNC_CLOSE;
                 break;
             case CLIENT_DECORATE:
-                *en = client_normal(c);
+                *en = c->functions & OB_CLIENT_FUNC_UNDECORATE;
                 break;
             default:
                 *en = TRUE;
@@ -153,6 +154,8 @@ static void client_menu_execute(ObMenuEntry *e, ObMenuFrame *f,
         g_assert_not_reached();
     }
 
+    event_ignore_all_queued_enters();
+
     /* update the menu cuz stuff can have changed */
     if (f) {
         client_menu_update(f, NULL);
@@ -176,13 +179,13 @@ static gboolean layer_menu_update(ObMenuFrame *frame, gpointer data)
         if (e->type == OB_MENU_ENTRY_TYPE_NORMAL) {
             switch (e->id) {
             case LAYER_TOP:
-                *en = !c->above;
+                *en = !c->above && (c->functions & OB_CLIENT_FUNC_ABOVE);
                 break;
             case LAYER_NORMAL:
                 *en = c->above || c->below;
                 break;
             case LAYER_BOTTOM:
-                *en = !c->below;
+                *en = !c->below && (c->functions & OB_CLIENT_FUNC_BELOW);
                 break;
             default:
                 *en = TRUE;
@@ -212,6 +215,8 @@ static void layer_menu_execute(ObMenuEntry *e, ObMenuFrame *f,
         g_assert_not_reached();
     }
 
+    event_ignore_all_queued_enters();
+
     /* update the menu cuz stuff can have changed */
     if (f) {
         layer_menu_update(f, NULL);
This page took 0.024008 seconds and 4 git commands to generate.