start fixed-size-requesting apps on the floating layer (even though they are still resizable for now, at least they'll start with their wanted size)

This commit is contained in:
Sander van Dijk 2006-05-22 20:35:20 +00:00
parent 1f0f42420c
commit 903d558f08
3 changed files with 18 additions and 1 deletions

View File

@ -66,6 +66,14 @@ create_client(Window w, XWindowAttributes *wa)
XGetTransientForHint(dpy, c->win, &c->trans);
if(!XGetWMNormalHints(dpy, c->win, &c->size, &msize) || !c->size.flags)
c->size.flags = PSize;
if(c->size.flags & PMinSize && c->size.flags & PMaxSize) {
if(c->size.min_width == c->size.max_width)
c->fixedsize = True;
if(c->size.min_height == c->size.max_height)
c->fixedsize = True;
}
else
c->fixedsize = False;
XAddToSaveSet(dpy, c->win);
update_client_name(c);
if(XGetClassHint(dpy, c->win, &ch)) {
@ -245,6 +253,14 @@ prop_client(Client *c, XPropertyEvent *e)
if(!XGetWMNormalHints(dpy, c->win, &c->size, &msize) || !c->size.flags) {
c->size.flags = PSize;
}
if(c->size.flags & PMinSize && c->size.flags & PMaxSize) {
if(c->size.min_width == c->size.max_width)
c->fixedsize = True;
if(c->size.min_height == c->size.max_height)
c->fixedsize = True;
}
else
c->fixedsize = False;
break;
}
if(e->atom == XA_WM_NAME || e->atom == net_atom[NetWMName]) {

View File

@ -218,7 +218,7 @@ attach_to_view(View *v, Client *c)
c->revert = nil;
if(c->trans || c->floating
if(c->trans || c->floating || c->fixedsize
|| (c->rect.width == rect.width && c->rect.height == rect.height))
a = v->area.data[0];
else

View File

@ -117,6 +117,7 @@ struct Client {
int proto;
unsigned int border;
Bool floating;
Bool fixedsize;
Window win;
Window trans;
XRectangle rect;