diff --git a/cmd/wm/client.c b/cmd/wm/client.c index 0017fea2..780ee289 100644 --- a/cmd/wm/client.c +++ b/cmd/wm/client.c @@ -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]) { diff --git a/cmd/wm/view.c b/cmd/wm/view.c index 1be300ee..e2ff2463 100644 --- a/cmd/wm/view.c +++ b/cmd/wm/view.c @@ -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 diff --git a/cmd/wm/wm.h b/cmd/wm/wm.h index b4733f7f..97af61a9 100644 --- a/cmd/wm/wm.h +++ b/cmd/wm/wm.h @@ -117,6 +117,7 @@ struct Client { int proto; unsigned int border; Bool floating; + Bool fixedsize; Window win; Window trans; XRectangle rect;