for MoveResizeTo make <width>current</width> and <height>current</height> and <monitor>current</monitor> work like <x> and <y>
This commit is contained in:
parent
6066a338fd
commit
64c59b7456
1 changed files with 18 additions and 6 deletions
|
@ -66,13 +66,25 @@ static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node)
|
|||
if ((n = parse_find_node("y", node)))
|
||||
parse_coord(doc, n, &o->y, &o->yopposite, &o->ycenter);
|
||||
|
||||
if ((n = parse_find_node("width", node)))
|
||||
o->w = parse_int(doc, n);
|
||||
if ((n = parse_find_node("height", node)))
|
||||
o->h = parse_int(doc, n);
|
||||
if ((n = parse_find_node("width", node))) {
|
||||
gchar *s = parse_string(doc, n);
|
||||
if (g_ascii_strcasecmp(s, "current") != 0)
|
||||
o->w = parse_int(doc, n);
|
||||
g_free(s);
|
||||
}
|
||||
if ((n = parse_find_node("height", node))) {
|
||||
gchar *s = parse_string(doc, n);
|
||||
if (g_ascii_strcasecmp(s, "current") != 0)
|
||||
o->h = parse_int(doc, n);
|
||||
g_free(s);
|
||||
}
|
||||
|
||||
if ((n = parse_find_node("monitor", node)))
|
||||
o->monitor = parse_int(doc, n) - 1;
|
||||
if ((n = parse_find_node("monitor", node))) {
|
||||
gchar *s = parse_string(doc, n);
|
||||
if (g_ascii_strcasecmp(s, "current") != 0)
|
||||
o->monitor = parse_int(doc, n) - 1;
|
||||
g_free(s);
|
||||
}
|
||||
|
||||
return o;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue