X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=openbox%2Faction.c;h=614b196ad17857fa33bbc181223172ca8e67fe58;hb=506c1aa005d0328d4d32e123d437c6afe92b8ea4;hp=342f0a8689d01011eb7fc74eb401fd09d719165c;hpb=5c472be0b312243b7ef705c84ef42f6560537e04;p=chaz%2Fopenbox diff --git a/openbox/action.c b/openbox/action.c index 342f0a86..614b196a 100644 --- a/openbox/action.c +++ b/openbox/action.c @@ -92,6 +92,7 @@ Action *action_from_string(char *name) 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,17 +366,21 @@ void action_toggle_maximize_vert(union ActionData *data) void action_send_to_desktop(union ActionData *data) { - if (data->sendto.c) - if (data->sendto.desktop < screen_num_desktops || - data->sendto.desktop == DESKTOP_ALL) - client_set_desktop(data->sendto.c, data->sendto.desktop, 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) { guint d; - if (!data->sendto.c) return; + if (!data->sendtonextprev.c) return; d = screen_desktop + 1; if (d >= screen_num_desktops) { @@ -390,7 +395,7 @@ void action_send_to_previous_desktop(union ActionData *data) { guint d; - if (!data->sendto.c) return; + if (!data->sendtonextprev.c) return; d = screen_desktop - 1; if (d >= screen_num_desktops) {