commit the movetocenter action since it appears someone else than me wanted it after all
Mikael Magnusson mikachu@comhem.se
2 files changed,
18 insertions(+),
0 deletions(-)
M
openbox/action.c
→
openbox/action.c
@@ -537,6 +537,11 @@ action_move_relative_vert,
setup_client_action }, { + "movetocenter", + action_move_to_center, + setup_client_action + }, + { "resizerelativehorz", action_resize_relative_horz, setup_client_action@@ -1149,6 +1154,17 @@ {
ObClient *c = data->relative.any.c; client_action_start(data); client_move(c, c->area.x, c->area.y + data->relative.delta); + client_action_end(data); +} + +void action_move_to_center(union ActionData *data) +{ + ObClient *c = data->client.any.c; + Rect *area; + area = screen_area_monitor(c->desktop, 0); + client_action_start(data); + client_move(c, area->width / 2 - c->area.width / 2, + area->height / 2 - c->area.height / 2); client_action_end(data); }
M
openbox/action.h
→
openbox/action.h
@@ -249,6 +249,8 @@ /* MoveResizeRelative */
void action_move_relative_horz(union ActionData *data); /* MoveResizeRelative */ void action_move_relative_vert(union ActionData *data); +/* ClientAction */ +void action_move_to_center(union ActionData *data); /* MoveResizeRelative */ void action_resize_relative_horz(union ActionData *data); /* MoveResizeRelative */