diff options
| author | Dana Jansens <danakj@orodu.net> | 2008-01-15 19:54:30 -0500 |
|---|---|---|
| committer | Mikael Magnusson <mikachu@comhem.se> | 2008-01-16 02:08:42 +0100 |
| commit | 26f34d3ba0794c09757393881610b552e7bbbbeb (patch) | |
| tree | 0b4e8c930a4cfda4217b123b83f518cbfb676f72 /openbox/actions | |
| parent | ed51baa95808ad0235e30d3c5215deca4b9faa6b (diff) | |
resizing was defaulting to the topleft corner instead of to the auto-ness or something..
Diffstat (limited to 'openbox/actions')
| -rw-r--r-- | openbox/actions/resize.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/openbox/actions/resize.c b/openbox/actions/resize.c index 81901bdd..3714e38b 100644 --- a/openbox/actions/resize.c +++ b/openbox/actions/resize.c @@ -5,6 +5,7 @@ #include "openbox/frame.h" typedef struct { + gboolean corner_specified; guint32 corner; } Options; @@ -33,6 +34,8 @@ static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node) if ((n = parse_find_node("edge", node))) { gchar *s = parse_string(doc, n); + + o->corner_specified = TRUE; if (!g_ascii_strcasecmp(s, "top")) o->corner = prop_atoms.net_wm_moveresize_size_top; else if (!g_ascii_strcasecmp(s, "bottom")) @@ -49,6 +52,9 @@ static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node) o->corner = prop_atoms.net_wm_moveresize_size_bottomleft; else if (!g_ascii_strcasecmp(s, "bottomright")) o->corner = prop_atoms.net_wm_moveresize_size_bottomright; + else + o->corner_specified = FALSE; + g_free(s); } return o; @@ -72,7 +78,7 @@ static gboolean run_func(ObActionsData *data, gpointer options) if (!data->button) corner = prop_atoms.net_wm_moveresize_size_keyboard; - else if (o->corner) + else if (o->corner_specified) corner = o->corner; /* it was specified in the binding */ else corner = pick_corner(data->x, data->y, |
