From: Dana Jansens Date: Sun, 22 Jul 2007 12:48:23 +0000 (-0400) Subject: for MoveResizeTo make current and current and current and current and current work like and --- diff --git a/openbox/actions/moveresizeto.c b/openbox/actions/moveresizeto.c index 3ecf41ad..48b6e3bf 100644 --- a/openbox/actions/moveresizeto.c +++ b/openbox/actions/moveresizeto.c @@ -66,13 +66,25 @@ static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node) if ((n = parse_find_node("y", node))) parse_coord(doc, n, &o->y, &o->yopposite, &o->ycenter); - if ((n = parse_find_node("width", node))) - o->w = parse_int(doc, n); - if ((n = parse_find_node("height", node))) - o->h = parse_int(doc, n); + if ((n = parse_find_node("width", node))) { + gchar *s = parse_string(doc, n); + if (g_ascii_strcasecmp(s, "current") != 0) + o->w = parse_int(doc, n); + g_free(s); + } + if ((n = parse_find_node("height", node))) { + gchar *s = parse_string(doc, n); + if (g_ascii_strcasecmp(s, "current") != 0) + o->h = parse_int(doc, n); + g_free(s); + } - if ((n = parse_find_node("monitor", node))) - o->monitor = parse_int(doc, n) - 1; + if ((n = parse_find_node("monitor", node))) { + gchar *s = parse_string(doc, n); + if (g_ascii_strcasecmp(s, "current") != 0) + o->monitor = parse_int(doc, n) - 1; + g_free(s); + } return o; }