Only resize clients when it would actually change their size. Prevents infinite loops with certain unscrupulous clients.

This commit is contained in:
Kris Maglione 2010-05-24 20:09:11 -04:00
parent f19313209a
commit e66079c942
3 changed files with 9 additions and 6 deletions

View File

@ -1,6 +1,6 @@
pkgname="wmii-hg" pkgname="wmii-hg"
pkgver=2636 pkgver=2637
pkgrel=1 pkgrel=1
pkgdesc="The latest hg pull of wmii, a lightweight, dynamic window manager for X11" pkgdesc="The latest hg pull of wmii, a lightweight, dynamic window manager for X11"
url="http://wmii.suckless.org" url="http://wmii.suckless.org"
@ -15,7 +15,6 @@ optdepends=("plan9port: for use of the alternative plan9port wmiirc" \
provides=("wmii") provides=("wmii")
conflicts=("wmii") conflicts=("wmii")
source=() source=()
options=(!makeflags)
test -d src || mkdir src test -d src || mkdir src
ln -snf .. src/wmii ln -snf .. src/wmii

View File

@ -523,6 +523,7 @@ client_focus(Client *c) {
void void
client_resize(Client *c, Rectangle r) { client_resize(Client *c, Rectangle r) {
bool client_resized, frame_resized;
Frame *f; Frame *f;
f = c->sel; f = c->sel;
@ -547,10 +548,13 @@ client_resize(Client *c, Rectangle r) {
client_unmap(c, IconicState); client_unmap(c, IconicState);
}else { }else {
client_map(c); client_map(c);
reshapewin(c->framewin, f->r); if((frame_resized = !eqrect(c->framewin->r, f->r)))
reshapewin(&c->w, f->crect); reshapewin(c->framewin, f->r);
if((client_resized = !eqrect(c->w.r, f->crect)))
reshapewin(&c->w, f->crect);
map_frame(c); map_frame(c);
client_configure(c); if(client_resized || frame_resized)
client_configure(c);
ewmh_framesize(c); ewmh_framesize(c);
} }
} }

View File

@ -215,11 +215,11 @@ view_update_rect(View *v) {
return false; return false;
*/ */
top = 0; top = 0;
left = 0; left = 0;
right = 0; right = 0;
bottom = 0; bottom = 0;
vec.n = 0;
for(f=v->floating->frame; f; f=f->anext) { for(f=v->floating->frame; f; f=f->anext) {
strut = f->client->strut; strut = f->client->strut;
if(!strut) if(!strut)