devdraw: set windowrect correctly on x11 if window gets unexpected size

Fixes #54.
This commit is contained in:
Russ Cox 2020-01-15 11:25:36 -05:00
parent ba60bab3cd
commit fe2b2de984

View file

@ -550,8 +550,6 @@ xattach(Client *client, char *label, char *winsize)
havemin = 0;
}
w = newxwin(client);
w->screenrect = Rect(0, 0, WidthOfScreen(xscreen), HeightOfScreen(xscreen));
w->windowrect = r;
memset(&attr, 0, sizeof attr);
attr.colormap = _x.cmap;
@ -679,6 +677,8 @@ xattach(Client *client, char *label, char *winsize)
}
}else
fprint(2, "XGetWindowAttributes: bad attrs\n");
w->screenrect = Rect(0, 0, WidthOfScreen(xscreen), HeightOfScreen(xscreen));
w->windowrect = r;
/*
* Allocate our local backing store.