add follow option back for sendto actions
This commit is contained in:
parent
6f37c38b1c
commit
9290376bbb
2 changed files with 19 additions and 4 deletions
|
@ -82,6 +82,7 @@ void setup_action_directional_focus_northwest(ObAction *a)
|
|||
|
||||
void setup_action_send_to_desktop(ObAction *a)
|
||||
{
|
||||
a->data.sendto.follow = TRUE;
|
||||
}
|
||||
|
||||
void setup_action_send_to_desktop_prev(ObAction *a)
|
||||
|
@ -89,6 +90,7 @@ void setup_action_send_to_desktop_prev(ObAction *a)
|
|||
a->data.sendtodir.dir = OB_DIRECTION_WEST;
|
||||
a->data.sendtodir.linear = TRUE;
|
||||
a->data.sendtodir.wrap = TRUE;
|
||||
a->data.sendtodir.follow = TRUE;
|
||||
}
|
||||
|
||||
void setup_action_send_to_desktop_next(ObAction *a)
|
||||
|
@ -96,6 +98,7 @@ void setup_action_send_to_desktop_next(ObAction *a)
|
|||
a->data.sendtodir.dir = OB_DIRECTION_EAST;
|
||||
a->data.sendtodir.linear = TRUE;
|
||||
a->data.sendtodir.wrap = TRUE;
|
||||
a->data.sendtodir.follow = TRUE;
|
||||
}
|
||||
|
||||
void setup_action_send_to_desktop_left(ObAction *a)
|
||||
|
@ -103,6 +106,7 @@ void setup_action_send_to_desktop_left(ObAction *a)
|
|||
a->data.sendtodir.dir = OB_DIRECTION_WEST;
|
||||
a->data.sendtodir.linear = FALSE;
|
||||
a->data.sendtodir.wrap = TRUE;
|
||||
a->data.sendtodir.follow = TRUE;
|
||||
}
|
||||
|
||||
void setup_action_send_to_desktop_right(ObAction *a)
|
||||
|
@ -110,6 +114,7 @@ void setup_action_send_to_desktop_right(ObAction *a)
|
|||
a->data.sendtodir.dir = OB_DIRECTION_EAST;
|
||||
a->data.sendtodir.linear = FALSE;
|
||||
a->data.sendtodir.wrap = TRUE;
|
||||
a->data.sendtodir.follow = TRUE;
|
||||
}
|
||||
|
||||
void setup_action_send_to_desktop_up(ObAction *a)
|
||||
|
@ -117,6 +122,7 @@ void setup_action_send_to_desktop_up(ObAction *a)
|
|||
a->data.sendtodir.dir = OB_DIRECTION_NORTH;
|
||||
a->data.sendtodir.linear = FALSE;
|
||||
a->data.sendtodir.wrap = TRUE;
|
||||
a->data.sendtodir.follow = TRUE;
|
||||
}
|
||||
|
||||
void setup_action_send_to_desktop_down(ObAction *a)
|
||||
|
@ -124,6 +130,7 @@ void setup_action_send_to_desktop_down(ObAction *a)
|
|||
a->data.sendtodir.dir = OB_DIRECTION_SOUTH;
|
||||
a->data.sendtodir.linear = FALSE;
|
||||
a->data.sendtodir.wrap = TRUE;
|
||||
a->data.sendtodir.follow = TRUE;
|
||||
}
|
||||
|
||||
void setup_action_desktop_prev(ObAction *a)
|
||||
|
@ -718,9 +725,14 @@ ObAction *action_parse(xmlDocPtr doc, xmlNodePtr node)
|
|||
if ((n = parse_find_node("wrap", node->xmlChildrenNode))) {
|
||||
act->data.desktopdir.wrap = parse_bool(doc, n);
|
||||
}
|
||||
} else if (act->func == action_send_to_desktop) {
|
||||
if ((n = parse_find_node("follow", node->xmlChildrenNode)))
|
||||
act->data.sendto.follow = parse_bool(doc, n);
|
||||
} else if (act->func == action_send_to_desktop_dir) {
|
||||
if ((n = parse_find_node("wrap", node->xmlChildrenNode)))
|
||||
act->data.sendtodir.wrap = parse_bool(doc, n);
|
||||
if ((n = parse_find_node("follow", node->xmlChildrenNode)))
|
||||
act->data.sendtodir.follow = parse_bool(doc, n);
|
||||
} else if (act->func == action_activate) {
|
||||
if ((n = parse_find_node("here", node->xmlChildrenNode)))
|
||||
act->data.activate.here = parse_bool(doc, n);
|
||||
|
@ -974,7 +986,8 @@ void action_send_to_desktop(union ActionData *data)
|
|||
|
||||
if (data->sendto.desk < screen_num_desktops ||
|
||||
data->sendto.desk == DESKTOP_ALL) {
|
||||
client_set_desktop(c, data->sendto.desk, TRUE);
|
||||
client_set_desktop(c, data->sendto.desk, data->sendtodir.follow);
|
||||
if (data->sendto.follow)
|
||||
screen_set_desktop(data->sendto.desk);
|
||||
}
|
||||
}
|
||||
|
@ -1006,7 +1019,8 @@ void action_send_to_desktop_dir(union ActionData *data)
|
|||
d = screen_cycle_desktop(data->sendtodir.dir, data->sendtodir.wrap,
|
||||
data->sendtodir.linear,
|
||||
data->sendtodir.final, data->sendtodir.cancel);
|
||||
client_set_desktop(c, d, TRUE);
|
||||
client_set_desktop(c, d, data->sendtodir.follow);
|
||||
if (data->sendtodir.follow)
|
||||
screen_set_desktop(d);
|
||||
}
|
||||
|
||||
|
|
|
@ -52,6 +52,7 @@ struct SendToDesktopDirection {
|
|||
gboolean linear;
|
||||
gboolean final;
|
||||
gboolean cancel;
|
||||
gboolean follow;
|
||||
};
|
||||
|
||||
struct Desktop {
|
||||
|
|
Loading…
Reference in a new issue