all repos — openbox @ 2135d9e2fda58dcf1c9a40266fd1b38c1cd4d71f

openbox fork - make it a bit more like ryudo

make SendToDesktop action work right, give the option of following
Dana Jansens danakj@orodu.net
commit

2135d9e2fda58dcf1c9a40266fd1b38c1cd4d71f

parent

4d5885d271d4943636e7e775492e8f4bd7fe8a84

2 files changed, 17 insertions(+), 5 deletions(-)

jump to
M openbox/action.copenbox/action.c

@@ -92,6 +92,7 @@ } else if (!g_ascii_strcasecmp(name, "togglemaximizevert")) {

a = action_new(action_toggle_maximize_vert); } else if (!g_ascii_strcasecmp(name, "sendtodesktop")) { a = action_new(action_send_to_desktop); + a->data.sendto.follow = TRUE; } else if (!g_ascii_strcasecmp(name, "sendtonextdesktop")) { a = action_new(action_send_to_next_desktop); a->data.sendtonextprev.wrap = FALSE;

@@ -365,10 +366,14 @@ }

void action_send_to_desktop(union ActionData *data) { - if (data->desktop.c) - if (data->desktop.desk < screen_num_desktops || - data->desktop.desk == DESKTOP_ALL) - client_set_desktop(data->desktop.c, data->desktop.desk, TRUE); + if (data->sendto.c) { + if (data->sendto.desk < screen_num_desktops || + data->sendto.desk == DESKTOP_ALL) { + client_set_desktop(data->desktop.c, + data->sendto.desk, data->sendto.follow); + if (data->sendto.follow) screen_set_desktop(data->sendto.desk); + } + } } void action_send_to_next_desktop(union ActionData *data)
M openbox/action.hopenbox/action.h

@@ -26,6 +26,12 @@ Client *c;

int delta; }; +struct SendToDesktop { + Client *c; + guint desk; + gboolean follow; +}; + struct SendToNextPreviousDesktop { Client *c; gboolean wrap;

@@ -67,6 +73,7 @@ struct AnyAction any;

struct Execute execute; struct ClientAction client; struct MoveResizeRelative relative; + struct SendToDesktop sendto; struct SendToNextPreviousDesktop sendtonextprev; struct Desktop desktop; struct NextPreviousDesktop nextprevdesktop;

@@ -155,7 +162,7 @@ /* ClientAction */

void action_unmaximize_vert(union ActionData *data); /* ClientAction */ void action_toggle_maximize_vert(union ActionData *data); -/* Desktop */ +/* SendToDesktop */ void action_send_to_desktop(union ActionData *data); /* SendToNextPreviousDesktop */ void action_send_to_next_desktop(union ActionData *data);