From: Dana Jansens Date: Sat, 11 Oct 2003 04:11:29 +0000 (+0000) Subject: switch to the desktop after activating the client. this means that for omnipresent... X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=7833271d1461d9b0e02ffc804cd4e0156fd8faf4;p=chaz%2Fopenbox switch to the desktop after activating the client. this means that for omnipresent windows, you still move to the desktop on which you selected it. --- diff --git a/openbox/client_list_menu.c b/openbox/client_list_menu.c index 4d4555f8..985cb729 100644 --- a/openbox/client_list_menu.c +++ b/openbox/client_list_menu.c @@ -50,7 +50,7 @@ static void desk_menu_update(ObMenuFrame *frame, gpointer data) for (it = focus_order[d->desktop], i = 0; it; it = g_list_next(it), ++i) { ObClient *c = it->data; if (client_normal(c)) { - GSList *acts; + GSList *acts = NULL; ObAction* act; ObMenuEntry *e; const ObClientIcon *icon; @@ -65,7 +65,11 @@ static void desk_menu_update(ObMenuFrame *frame, gpointer data) act = action_from_string("Activate", OB_USER_ACTION_MENU_SELECTION); act->data.activate.any.c = c; - acts = g_slist_prepend(NULL, act); + acts = g_slist_append(acts, act); + act = action_from_string("Desktop", + OB_USER_ACTION_MENU_SELECTION); + act->data.desktop.desk = d->desktop; + acts = g_slist_append(acts, act); e = menu_add_normal(menu, i, (c->iconic ? c->icon_title : c->title), acts); @@ -80,11 +84,11 @@ static void desk_menu_update(ObMenuFrame *frame, gpointer data) if (empty) { /* no entries */ - GSList *acts; + GSList *acts = NULL; ObAction* act; act = action_from_string("Desktop", OB_USER_ACTION_MENU_SELECTION); act->data.desktop.desk = d->desktop; - acts = g_slist_prepend(NULL, act); + acts = g_slist_append(acts, act); menu_add_normal(menu, 0, _("Go there..."), acts); } }