all repos — openbox @ 2ce7572e46bdac383e89bc7c756b88d2686466cf

openbox fork - make it a bit more like ryudo

commit the movetocenter action since it appears someone else than me wanted it after all
Mikael Magnusson mikachu@comhem.se
commit

2ce7572e46bdac383e89bc7c756b88d2686466cf

parent

99b2fed8f5002f1539a48e8790e2a0ee8f494331

2 files changed, 18 insertions(+), 0 deletions(-)

jump to
M openbox/action.copenbox/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.hopenbox/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 */