diff -Nwru openbox-3.4.7.2/data/rc.xsd openbox-3.4.7.2.patched/data/rc.xsd --- openbox-3.4.7.2/data/rc.xsd 2008-02-29 22:18:07.000000000 +0100 +++ openbox-3.4.7.2.patched/data/rc.xsd 2009-09-01 12:09:53.000000000 +0200 @@ -171,8 +171,8 @@ - - + + @@ -365,6 +365,20 @@ + + + + + + + + + + + + + + diff -Nwru openbox-3.4.7.2/openbox/actions/moveresizeto.c openbox-3.4.7.2.patched/openbox/actions/moveresizeto.c --- openbox-3.4.7.2/openbox/actions/moveresizeto.c 2008-04-14 01:22:11.000000000 +0200 +++ openbox-3.4.7.2.patched/openbox/actions/moveresizeto.c 2009-09-01 12:06:10.000000000 +0200 @@ -12,6 +12,10 @@ typedef struct { gboolean xcenter; gboolean ycenter; + gboolean rightofcenter; + gboolean leftofcenter; + gboolean abovecenter; + gboolean belowcenter; gboolean xopposite; gboolean yopposite; gint x; @@ -42,12 +46,22 @@ } static void parse_coord(xmlDocPtr doc, xmlNodePtr n, gint *pos, - gboolean *opposite, gboolean *center) + gboolean *opposite, gboolean *rightofcenter, + gboolean *leftofcenter, gboolean *abovecenter, + gboolean *belowcenter, gboolean *center) { gchar *s = parse_string(doc, n); if (g_ascii_strcasecmp(s, "current") != 0) { if (!g_ascii_strcasecmp(s, "center")) *center = TRUE; + else if (!g_ascii_strcasecmp(s, "rightofcenter")) + *rightofcenter = TRUE; + else if (!g_ascii_strcasecmp(s, "leftofcenter")) + *leftofcenter = TRUE; + else if (!g_ascii_strcasecmp(s, "belowcenter")) + *belowcenter = TRUE; + else if (!g_ascii_strcasecmp(s, "abovecenter")) + *abovecenter = TRUE; else { if (s[0] == '-') *opposite = TRUE; @@ -73,10 +87,14 @@ o->monitor = CURRENT_MONITOR; if ((n = parse_find_node("x", node))) - parse_coord(doc, n, &o->x, &o->xopposite, &o->xcenter); + parse_coord(doc, n, &o->x, &o->xopposite, + &o->rightofcenter, &o->leftofcenter, + &o->abovecenter, &o->belowcenter, &o->xcenter); if ((n = parse_find_node("y", node))) - parse_coord(doc, n, &o->y, &o->yopposite, &o->ycenter); + parse_coord(doc, n, &o->y, &o->yopposite, + &o->rightofcenter, &o->leftofcenter, + &o->abovecenter, &o->belowcenter, &o->ycenter); if ((n = parse_find_node("width", node))) { gchar *s = parse_string(doc, n); @@ -165,12 +183,16 @@ x = o->x; if (o->xcenter) x = (area->width - w) / 2; + else if (o->leftofcenter) x = (area->width / 2) - w; + else if (o->rightofcenter) x = area->width / 2; else if (x == G_MININT) x = c->frame->area.x - carea->x; else if (o->xopposite) x = area->width - w - x; x += area->x; y = o->y; if (o->ycenter) y = (area->height - h) / 2; + else if (o->abovecenter) y = (area->height / 2) - h; + else if (o->belowcenter) y = area->height / 2; else if (y == G_MININT) y = c->frame->area.y - carea->y; else if (o->yopposite) y = area->height - h - y; y += area->y;