diff options
| author | Mikael Magnusson <mikachu@comhem.se> | 2005-01-31 19:04:18 +0000 |
|---|---|---|
| committer | Mikael Magnusson <mikachu@comhem.se> | 2005-01-31 19:04:18 +0000 |
| commit | 2ce7572e46bdac383e89bc7c756b88d2686466cf (patch) | |
| tree | 1fbcc8658eda3a1c827d25ab9bfe82a2c4cf8ade /openbox/action.c | |
| parent | 99b2fed8f5002f1539a48e8790e2a0ee8f494331 (diff) | |
commit the movetocenter action since it appears someone else than me wanted it after all
Diffstat (limited to 'openbox/action.c')
| -rw-r--r-- | openbox/action.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/openbox/action.c b/openbox/action.c index ef8052e7..66475880 100644 --- a/openbox/action.c +++ b/openbox/action.c @@ -537,6 +537,11 @@ ActionString actionstrings[] = setup_client_action }, { + "movetocenter", + action_move_to_center, + setup_client_action + }, + { "resizerelativehorz", action_resize_relative_horz, setup_client_action @@ -1152,6 +1157,17 @@ void action_move_relative_vert(union ActionData *data) 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); +} + void action_resize_relative_horz(union ActionData *data) { ObClient *c = data->relative.any.c; |
