a = action_new(action_unmaximize_vert);
} 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;
void action_resize_relative_vert(union ActionData *data)
{
Client *c = data->relative.c;
- if (c)
+ if (c && !c->shaded)
client_configure(c, Corner_TopLeft, c->area.x, c->area.y,
c->area.width, c->area.height + data->relative.delta,
TRUE, TRUE);
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) {
{
guint d;
- if (!data->sendto.c) return;
+ if (!data->sendtonextprev.c) return;
d = screen_desktop - 1;
if (d >= screen_num_desktops) {
int w = data->resize.x;
int h = data->resize.y;
- if (!c || !client_normal(c)) return;
+ if (!c || c->shaded || !client_normal(c)) return;
- /* XXX window snapping/struts */
-
dispatch_resize(c, &w, &h, data->resize.corner);
w -= c->frame->size.left + c->frame->size.right;