split up the relative move/resize actions into horz/vert
This commit is contained in:
parent
9eeb13ec71
commit
1a32ba561a
2 changed files with 38 additions and 14 deletions
|
@ -60,10 +60,14 @@ Action *action_from_string(char *name)
|
||||||
a = action_new(action_toggle_shade);
|
a = action_new(action_toggle_shade);
|
||||||
} else if (!g_ascii_strcasecmp(name, "toggleomnipresent")) {
|
} else if (!g_ascii_strcasecmp(name, "toggleomnipresent")) {
|
||||||
a = action_new(action_toggle_omnipresent);
|
a = action_new(action_toggle_omnipresent);
|
||||||
} else if (!g_ascii_strcasecmp(name, "moverelative")) {
|
} else if (!g_ascii_strcasecmp(name, "moverelativehorz")) {
|
||||||
a = action_new(action_move_relative);
|
a = action_new(action_move_relative_horz);
|
||||||
} else if (!g_ascii_strcasecmp(name, "resizerelative")) {
|
} else if (!g_ascii_strcasecmp(name, "moverelativevert")) {
|
||||||
a = action_new(action_resize_relative);
|
a = action_new(action_move_relative_vert);
|
||||||
|
} else if (!g_ascii_strcasecmp(name, "resizerelativehorz")) {
|
||||||
|
a = action_new(action_resize_relative_horz);
|
||||||
|
} else if (!g_ascii_strcasecmp(name, "resizerelativevert")) {
|
||||||
|
a = action_new(action_resize_relative_vert);
|
||||||
} else if (!g_ascii_strcasecmp(name, "maximizefull")) {
|
} else if (!g_ascii_strcasecmp(name, "maximizefull")) {
|
||||||
a = action_new(action_maximize_full);
|
a = action_new(action_maximize_full);
|
||||||
} else if (!g_ascii_strcasecmp(name, "unmaximizefull")) {
|
} else if (!g_ascii_strcasecmp(name, "unmaximizefull")) {
|
||||||
|
@ -234,23 +238,40 @@ void action_toggle_omnipresent(union ActionData *data)
|
||||||
screen_desktop : DESKTOP_ALL);
|
screen_desktop : DESKTOP_ALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void action_move_relative(union ActionData *data)
|
void action_move_relative_horz(union ActionData *data)
|
||||||
{
|
{
|
||||||
Client *c = data->relative.c;
|
Client *c = data->relative.c;
|
||||||
if (c)
|
if (c)
|
||||||
client_configure(c, Corner_TopLeft,
|
client_configure(c, Corner_TopLeft,
|
||||||
c->area.x + data->relative.dx,
|
c->area.x + data->relative.delta, c->area.y,
|
||||||
c->area.y + data->relative.dy,
|
|
||||||
c->area.width, c->area.height, TRUE, TRUE);
|
c->area.width, c->area.height, TRUE, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void action_resize_relative(union ActionData *data)
|
void action_move_relative_vert(union ActionData *data)
|
||||||
|
{
|
||||||
|
Client *c = data->relative.c;
|
||||||
|
if (c)
|
||||||
|
client_configure(c, Corner_TopLeft,
|
||||||
|
c->area.x, c->area.y + data->relative.delta,
|
||||||
|
c->area.width, c->area.height, TRUE, TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void action_resize_relative_horz(union ActionData *data)
|
||||||
{
|
{
|
||||||
Client *c = data->relative.c;
|
Client *c = data->relative.c;
|
||||||
if (c)
|
if (c)
|
||||||
client_configure(c, Corner_TopLeft, c->area.x, c->area.y,
|
client_configure(c, Corner_TopLeft, c->area.x, c->area.y,
|
||||||
c->area.width + data->relative.dx,
|
c->area.width + data->relative.delta,
|
||||||
c->area.height + data->relative.dy, TRUE, TRUE);
|
c->area.height, TRUE, TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
void action_resize_relative_vert(union ActionData *data)
|
||||||
|
{
|
||||||
|
Client *c = data->relative.c;
|
||||||
|
if (c)
|
||||||
|
client_configure(c, Corner_TopLeft, c->area.x, c->area.y,
|
||||||
|
c->area.width, c->area.height + data->relative.delta,
|
||||||
|
TRUE, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void action_maximize_full(union ActionData *data)
|
void action_maximize_full(union ActionData *data)
|
||||||
|
|
|
@ -23,8 +23,7 @@ struct ClientAction {
|
||||||
|
|
||||||
struct MoveResizeRelative {
|
struct MoveResizeRelative {
|
||||||
Client *c;
|
Client *c;
|
||||||
int dx;
|
int delta;
|
||||||
int dy;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SendToDesktop {
|
struct SendToDesktop {
|
||||||
|
@ -123,9 +122,13 @@ void action_toggle_shade(union ActionData *data);
|
||||||
/* ClientAction */
|
/* ClientAction */
|
||||||
void action_toggle_omnipresent(union ActionData *data);
|
void action_toggle_omnipresent(union ActionData *data);
|
||||||
/* MoveResizeRelative */
|
/* MoveResizeRelative */
|
||||||
void action_move_relative(union ActionData *data);
|
void action_move_relative_horz(union ActionData *data);
|
||||||
/* MoveResizeRelative */
|
/* MoveResizeRelative */
|
||||||
void action_resize_relative(union ActionData *data);
|
void action_move_relative_vert(union ActionData *data);
|
||||||
|
/* MoveResizeRelative */
|
||||||
|
void action_resize_relative_horz(union ActionData *data);
|
||||||
|
/* MoveResizeRelative */
|
||||||
|
void action_resize_relative_vert(union ActionData *data);
|
||||||
/* ClientAction */
|
/* ClientAction */
|
||||||
void action_maximize_full(union ActionData *data);
|
void action_maximize_full(union ActionData *data);
|
||||||
/* ClientAction */
|
/* ClientAction */
|
||||||
|
|
Loading…
Reference in a new issue