wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit 903d558f0845c84e5abec0b05321bf6934d81943
parent 1f0f42420ce08eb03a51f4e97d5528c1a25f96c7
Author: Sander van Dijk <sander@wmii.de>
Date:   Mon, 22 May 2006 20:35:20 +0000

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)


Diffstat:
cmd/wm/client.c | 16++++++++++++++++
cmd/wm/view.c | 2+-
cmd/wm/wm.h | 1+
3 files changed, 18 insertions(+), 1 deletion(-)

diff --git 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 @@ -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 @@ -117,6 +117,7 @@ struct Client { int proto; unsigned int border; Bool floating; + Bool fixedsize; Window win; Window trans; XRectangle rect;