mirror of
https://github.com/0intro/wmii
synced 2025-02-28 04:04:02 +03:00
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:
parent
1f0f42420c
commit
903d558f08
@ -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]) {
|
||||
|
@ -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
|
||||
|
@ -117,6 +117,7 @@ struct Client {
|
||||
int proto;
|
||||
unsigned int border;
|
||||
Bool floating;
|
||||
Bool fixedsize;
|
||||
Window win;
|
||||
Window trans;
|
||||
XRectangle rect;
|
||||
|
Loading…
x
Reference in New Issue
Block a user