diff options
author | sabetts <sabetts> | 2004-10-05 17:41:47 +0000 |
---|---|---|
committer | sabetts <sabetts> | 2004-10-05 17:41:47 +0000 |
commit | e5373028a3f726cafc4de8f644d2cba3ac04db19 (patch) | |
tree | b84eb751069c140f9b7bae604cb8eb367657c400 | |
parent | d4cb2a0028d6a3ac5fe608e415eb4d40b91dc1dd (diff) | |
download | ratpoison-e5373028a3f726cafc4de8f644d2cba3ac04db19.zip |
(parse_wingravity): accept numbers for gravity.
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/actions.c | 18 |
3 files changed, 11 insertions, 9 deletions
@@ -31,3 +31,4 @@ Thien-Thi Nguyen <ttn@glug.org> Joshua Neuheisel <jneuheisel@msn.com> Sylvain BEUCLER <beuc@beuc.net> Cameron Patrick <cameron@patrick.wattle.id.au> +Trent Buck <fubarbaz@bigpond.com> @@ -8,6 +8,7 @@ aborts, the frame number when they select one, or 'No such frame' when they selected a nonexistent one. (cmd_version): return the version string in non-interactive mode. + (parse_wingravity): accept numbers for gravity. * src/events.c (property_notify): pass the root window to receive_command. diff --git a/src/actions.c b/src/actions.c index 84ba3b5..2f53294 100644 --- a/src/actions.c +++ b/src/actions.c @@ -2151,23 +2151,23 @@ parse_wingravity (char *data) { int ret = -1; - if (!strcasecmp (data, "northwest") || !strcasecmp (data, "nw")) + if (!strcasecmp (data, "northwest") || !strcasecmp (data, "nw") || !strcmp (data, "7")) ret = NorthWestGravity; - if (!strcasecmp (data, "north") || !strcasecmp (data, "n")) + if (!strcasecmp (data, "north") || !strcasecmp (data, "n") || !strcmp (data, "8")) ret = NorthGravity; - if (!strcasecmp (data, "northeast") || !strcasecmp (data, "ne")) + if (!strcasecmp (data, "northeast") || !strcasecmp (data, "ne") || !strcmp (data, "9")) ret = NorthEastGravity; - if (!strcasecmp (data, "west") || !strcasecmp (data, "w")) + if (!strcasecmp (data, "west") || !strcasecmp (data, "w") || !strcmp (data, "4")) ret = WestGravity; - if (!strcasecmp (data, "center") || !strcasecmp (data, "c")) + if (!strcasecmp (data, "center") || !strcasecmp (data, "c") || !strcmp (data, "5")) ret = CenterGravity; - if (!strcasecmp (data, "East") || !strcasecmp (data, "e")) + if (!strcasecmp (data, "east") || !strcasecmp (data, "e") || !strcmp (data, "6")) ret = EastGravity; - if (!strcasecmp (data, "southwest") || !strcasecmp (data, "sw")) + if (!strcasecmp (data, "southwest") || !strcasecmp (data, "sw") || !strcmp (data, "1")) ret = SouthWestGravity; - if (!strcasecmp (data, "South") || !strcasecmp (data, "s")) + if (!strcasecmp (data, "south") || !strcasecmp (data, "s") || !strcmp (data, "2")) ret = SouthGravity; - if (!strcasecmp (data, "southeast") || !strcasecmp (data, "se")) + if (!strcasecmp (data, "southeast") || !strcasecmp (data, "se") || !strcmp (data, "3")) ret = SouthEastGravity; return ret; |