commit the movetocenter action since it appears someone else than me wanted it after all
This commit is contained in:
parent
99b2fed8f5
commit
2ce7572e46
2 changed files with 18 additions and 0 deletions
|
@ -536,6 +536,11 @@ ActionString actionstrings[] =
|
||||||
action_move_relative_vert,
|
action_move_relative_vert,
|
||||||
setup_client_action
|
setup_client_action
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"movetocenter",
|
||||||
|
action_move_to_center,
|
||||||
|
setup_client_action
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"resizerelativehorz",
|
"resizerelativehorz",
|
||||||
action_resize_relative_horz,
|
action_resize_relative_horz,
|
||||||
|
@ -1152,6 +1157,17 @@ void action_move_relative_vert(union ActionData *data)
|
||||||
client_action_end(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)
|
void action_resize_relative_horz(union ActionData *data)
|
||||||
{
|
{
|
||||||
ObClient *c = data->relative.any.c;
|
ObClient *c = data->relative.any.c;
|
||||||
|
|
|
@ -249,6 +249,8 @@ void action_toggle_omnipresent(union ActionData *data);
|
||||||
void action_move_relative_horz(union ActionData *data);
|
void action_move_relative_horz(union ActionData *data);
|
||||||
/* MoveResizeRelative */
|
/* MoveResizeRelative */
|
||||||
void action_move_relative_vert(union ActionData *data);
|
void action_move_relative_vert(union ActionData *data);
|
||||||
|
/* ClientAction */
|
||||||
|
void action_move_to_center(union ActionData *data);
|
||||||
/* MoveResizeRelative */
|
/* MoveResizeRelative */
|
||||||
void action_resize_relative_horz(union ActionData *data);
|
void action_resize_relative_horz(union ActionData *data);
|
||||||
/* MoveResizeRelative */
|
/* MoveResizeRelative */
|
||||||
|
|
Loading…
Reference in a new issue