]> Dogcows Code - chaz/openbox/blobdiff - openbox/client_list_menu.c
disable the "Go there" menu entry when its the current desktop
[chaz/openbox] / openbox / client_list_menu.c
index 2ac2903869b01b98e72f0149763448fe321d183b..a1dc266c5066d1b713d8a3c68ade1cfe96d5a816 100644 (file)
@@ -86,10 +86,14 @@ static void desk_menu_update(ObMenuFrame *frame, gpointer data)
 
         GSList *acts = NULL;
         ObAction* act;
+        ObMenuEntry *e;
+
         act = action_from_string("Desktop", OB_USER_ACTION_MENU_SELECTION);
         act->data.desktop.desk = d->desktop;
         acts = g_slist_append(acts, act);
-        menu_add_normal(menu, 0, _("Go there..."), acts);
+        e = menu_add_normal(menu, 0, _("Go there..."), acts);
+        if (d->desktop == screen_desktop)
+            e->data.normal.enabled = FALSE;
     }
 }
 
This page took 0.022494 seconds and 4 git commands to generate.