wmii

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

commit dbe75862ef2e9a1e7946a28eeab7a3357a2da8a8
parent 59128c599d649d3531ece6d1456c37a7c53cec55
Author: Kris Maglione <kris@suckless.org>
Date:   Sun,  6 Jun 2010 18:06:44 -0400

Fix synthetic configure notify bug. Closes issue #193.

Diffstat:
cmd/wmii/client.c | 11+++++------
cmd/wmii/dat.h | 5+++--
cmd/wmii/ewmh.c | 4++--
cmd/wmii/message.c | 2+-
4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/cmd/wmii/client.c b/cmd/wmii/client.c @@ -518,6 +518,7 @@ focus(Client *c, bool user) { if(v != selview) view_focus(screen, v); frame_focus(c->sel); + view_restack(c->sel->view); } void @@ -552,7 +553,6 @@ client_focus(Client *c) { void client_resize(Client *c, Rectangle r) { - bool client_resized, frame_resized; Frame *f; f = c->sel; @@ -577,12 +577,10 @@ client_resize(Client *c, Rectangle r) { client_unmap(c, IconicState); }else { client_map(c); - if((frame_resized = !eqrect(c->framewin->r, f->r))) - reshapewin(c->framewin, f->r); - if((client_resized = !eqrect(c->w.r, f->crect))) - reshapewin(&c->w, f->crect); + reshapewin(c->framewin, f->r); + reshapewin(&c->w, f->crect); map_frame(c); - if(client_resized || frame_resized) + if(!eqrect(c->r, c->configr)) client_configure(c); ewmh_framesize(c); } @@ -603,6 +601,7 @@ void client_configure(Client *c) { Rectangle r; + c->configr = c->r; r = rectsubpt(c->r, Pt(c->border, c->border)); sendevent(&c->w, false, StructureNotifyMask, diff --git a/cmd/wmii/dat.h b/cmd/wmii/dat.h @@ -25,8 +25,8 @@ enum { PingTime = 10000, - PingPeriod = 2000, - PingPartition = 20, + PingPeriod = 4000, + PingPartition = 10, }; enum IncMode { @@ -162,6 +162,7 @@ struct Client { Strut* strut; Cursor cursor; Rectangle r; + Rectangle configr; char** retags; char name[256]; char tags[256]; diff --git a/cmd/wmii/ewmh.c b/cmd/wmii/ewmh.c @@ -217,7 +217,7 @@ event_client_clientmessage(Window *w, void *aux, XClientMessageEvent *e) { return false; Dprint(DEwmh, "\tsource: %ld\n", l[0]); - Dprint(DEwmh, "\twindow: 0x%lx\n", e->window); + Dprint(DEwmh, "\twindow: %#ulx\n", e->window); Dprint(DEwmh, "\tclient: %C\n", c); if(l[0] == SourceClient && abs(event_xtime - l[1]) > 5000) return false; @@ -229,7 +229,7 @@ event_client_clientmessage(Window *w, void *aux, XClientMessageEvent *e) { if(e->format != 32) return false; Dprint(DEwmh, "\tsource: %ld\n", l[0]); - Dprint(DEwmh, "\twindow: 0x%lx\n", e->window); + Dprint(DEwmh, "\twindow: %#ulx\n", e->window); client_kill(c, true); return false; } diff --git a/cmd/wmii/message.c b/cmd/wmii/message.c @@ -389,7 +389,7 @@ readctl_client(Client *c) { bufprint("fullscreen %d\n", c->fullscreen); else bufprint("fullscreen off\n"); - bufprint("group 0x%ulx\n", c->group ? c->group->leader : 0); + bufprint("group %#ulx\n", c->group ? c->group->leader : 0); bufprint("tags %s\n", c->tags); bufprint("urgent %s\n", TOGGLE(c->urgent)); return buffer;