typedef struct {
ObDirection dir;
gboolean shrink;
+ gboolean shrink_if_grow_fails;
} Options;
static gpointer setup_func(GHashTable *config);
!g_ascii_strcasecmp(s, "right"))
o->dir = OB_DIRECTION_EAST;
}
+ v = g_hash_table_lookup(config, "shrinkonscreenedge");
+ if (v && config_value_is_string(v))
+ o->shrink_if_grow_fails = config_value_bool(v);
return o;
}
client_find_resize_directional(c, o->dir, TRUE, &x, &y, &w, &h);
if (do_grow(data, x, y, w, h))
return TRUE;
+ if (!o->shrink_if_grow_fails)
+ return TRUE;
}
/* we couldn't grow, so try shrink! */