Fix negative width being ignored
In `x_parse_geometry` we modified the global settings struct for negative width instead of updating it in the struct that is currently being constructed. As a result the negative_width field was always false as it was being overwritten by the struct assignment after the functions return. Fixes #628
This commit is contained in:
parent
d6bd506669
commit
264df67a63
@ -531,16 +531,15 @@ void x_setup(void)
|
||||
struct geometry x_parse_geometry(const char *geom_str)
|
||||
{
|
||||
assert(geom_str);
|
||||
struct geometry geometry = { 0 };
|
||||
|
||||
if (geom_str[0] == '-') {
|
||||
settings.geometry.negative_width = true;
|
||||
geometry.negative_width = true;
|
||||
geom_str++;
|
||||
} else {
|
||||
settings.geometry.negative_width = false;
|
||||
geometry.negative_width = false;
|
||||
}
|
||||
|
||||
struct geometry geometry = { 0 };
|
||||
|
||||
int mask = XParseGeometry(geom_str,
|
||||
&geometry.x, &geometry.y,
|
||||
&geometry.w, &geometry.h);
|
||||
|
Loading…
x
Reference in New Issue
Block a user