diff --git a/cmd/wmii/client.c b/cmd/wmii/client.c index 2d3f227f..7efad7f2 100644 --- 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 index 6531d40c..ba0291c9 100644 --- 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 index 9a913d74..e2704d53 100644 --- 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 index c9464e5f..9404af8b 100644 --- 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;