Fix synthetic configure notify bug. Closes issue #193.

This commit is contained in:
Kris Maglione 2010-06-06 18:06:44 -04:00
parent 59128c599d
commit dbe75862ef
4 changed files with 11 additions and 11 deletions

View File

@ -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);
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,

View File

@ -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];

View File

@ -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;
}

View File

@ -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;