X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Factions%2Fresizerelative.c;h=f705c292bf8b75d4f30607cf6bf9875378e73ba0;hb=a5005506a89ecffe13e04cbcda5c20a2fa6ba25d;hp=1aefb515d8363040321305c83acf3409beb67f20;hpb=8ab1e9537e5aebfe48d826cbf266cf8d582d9d65;p=chaz%2Fopenbox diff --git a/openbox/actions/resizerelative.c b/openbox/actions/resizerelative.c index 1aefb515..f705c292 100644 --- a/openbox/actions/resizerelative.c +++ b/openbox/actions/resizerelative.c @@ -15,7 +15,7 @@ static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node); static void free_func(gpointer options); static gboolean run_func(ObActionsData *data, gpointer options); -void action_resizerelative_startup() +void action_resizerelative_startup(void) { actions_register("ResizeRelative", setup_func, @@ -35,9 +35,11 @@ static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node) o->left = parse_int(doc, n); if ((n = parse_find_node("right", node))) o->right = parse_int(doc, n); - if ((n = parse_find_node("top", node))) + if ((n = parse_find_node("top", node)) || + (n = parse_find_node("up", node))) o->top = parse_int(doc, n); - if ((n = parse_find_node("bottom", node))) + if ((n = parse_find_node("bottom", node)) || + (n = parse_find_node("down", node))) o->bottom = parse_int(doc, n); return o; @@ -76,9 +78,9 @@ static gboolean run_func(ObActionsData *data, gpointer options) yoff = yoff == 0 ? 0 : (yoff < 0 ? MAX(yoff, oh-nh) : MIN(yoff, oh-nh)); - actions_client_move(data, FALSE); - client_move_resize(c, x + xoff, y + yoff, nw, nh); actions_client_move(data, TRUE); + client_move_resize(c, x + xoff, y + yoff, nw, nh); + actions_client_move(data, FALSE); } return FALSE;