From e776acb0e75c84227d5a183d3d133efd5c0b0723 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Thu, 6 Mar 2008 20:06:38 +0100 Subject: [PATCH] Allow sending windows on other desktops to the current desktop. --- openbox/actions/desktop.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/openbox/actions/desktop.c b/openbox/actions/desktop.c index 37268bba..900a0354 100644 --- a/openbox/actions/desktop.c +++ b/openbox/actions/desktop.c @@ -5,6 +5,7 @@ typedef enum { LAST, + CURRENT, RELATIVE, ABSOLUTE } SwitchType; @@ -54,6 +55,8 @@ static gpointer setup_go_func(xmlNodePtr node) gchar *s = obt_parse_node_string(n); if (!g_ascii_strcasecmp(s, "last")) o->type = LAST; + else if (!g_ascii_strcasecmp(s, "current")) + o->type = CURRENT; else if (!g_ascii_strcasecmp(s, "next")) { o->type = RELATIVE; o->rel.linear = TRUE; @@ -118,12 +121,13 @@ static gboolean run_func(ObActionsData *data, gpointer options) Options *o = options; guint d; - - switch (o->type) { case LAST: d = screen_last_desktop; break; + case CURRENT: + d = screen_desktop; + break; case ABSOLUTE: d = o->abs.desktop; break; @@ -133,7 +137,9 @@ static gboolean run_func(ObActionsData *data, gpointer options) break; } - if (d < screen_num_desktops && d != screen_desktop) { + if (d < screen_num_desktops && + (d != screen_desktop || + (data->client && data->client->desktop != screen_desktop))) { gboolean go = TRUE; actions_client_move(data, TRUE); -- 2.34.1