all repos — openbox @ fa39954c9dd5e5212816d0b5006451734137a74c

openbox fork - make it a bit more like ryudo

Allow sending windows on other desktops to the current desktop.
Mikael Magnusson mikachu@comhem.se
commit

fa39954c9dd5e5212816d0b5006451734137a74c

parent

46ca54fd81096b466e51eace79d0761b2c4923f7

1 files changed, 9 insertions(+), 1 deletions(-)

jump to
M openbox/actions/desktop.copenbox/actions/desktop.c

@@ -6,6 +6,7 @@ #include "obt/keyboard.h"

typedef enum { LAST, + CURRENT, RELATIVE, ABSOLUTE } SwitchType;

@@ -168,6 +169,8 @@ if ((n = obt_xml_find_node(node, "to"))) {

gchar *s = obt_xml_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->u.rel.linear = TRUE;

@@ -272,6 +275,9 @@ switch (o->type) {

case LAST: d = screen_last_desktop; break; + case CURRENT: + d = screen_desktop; + break; case ABSOLUTE: d = o->u.abs.desktop; break;

@@ -283,7 +289,9 @@ default:

g_assert_not_reached(); } - 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);