summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-07-22 08:25:18 -0400
committerDana Jansens <danakj@orodu.net>2007-07-22 08:25:18 -0400
commitdd41ae98894a1bae63063996ddfa00e2b2936cdf (patch)
treecca2bb09b424705373d1674eb2a8b9b2714ae565
parent7d26873a32499bf97dc98b9dd8be1f4fd94e11cb (diff)
for MoveResizeTo, make <x>current</x> the same as not specifying <x/> at all
-rw-r--r--openbox/actions/moveresizeto.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/openbox/actions/moveresizeto.c b/openbox/actions/moveresizeto.c
index 75184ea3..3ecf41ad 100644
--- a/openbox/actions/moveresizeto.c
+++ b/openbox/actions/moveresizeto.c
@@ -33,15 +33,17 @@ static void parse_coord(xmlDocPtr doc, xmlNodePtr n, gint *pos,
gboolean *opposite, gboolean *center)
{
gchar *s = parse_string(doc, n);
- if (!g_ascii_strcasecmp(s, "center"))
- *center = TRUE;
- else {
- if (s[0] == '-')
- *opposite = TRUE;
- if (s[0] == '-' || s[0] == '+')
- *pos = atoi(s+1);
- else
- *pos = atoi(s);
+ if (g_ascii_strcasecmp(s, "current") != 0) {
+ if (!g_ascii_strcasecmp(s, "center"))
+ *center = TRUE;
+ else {
+ if (s[0] == '-')
+ *opposite = TRUE;
+ if (s[0] == '-' || s[0] == '+')
+ *pos = atoi(s+1);
+ else
+ *pos = atoi(s);
+ }
}
g_free(s);
}