mirror of
https://github.com/0intro/wmii
synced 2024-11-22 05:42:05 +03:00
Fix synthetic configure notify bug. Closes issue #193.
This commit is contained in:
parent
59128c599d
commit
dbe75862ef
@ -518,6 +518,7 @@ focus(Client *c, bool user) {
|
|||||||
if(v != selview)
|
if(v != selview)
|
||||||
view_focus(screen, v);
|
view_focus(screen, v);
|
||||||
frame_focus(c->sel);
|
frame_focus(c->sel);
|
||||||
|
view_restack(c->sel->view);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -552,7 +553,6 @@ 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;
|
||||||
@ -577,12 +577,10 @@ client_resize(Client *c, Rectangle r) {
|
|||||||
client_unmap(c, IconicState);
|
client_unmap(c, IconicState);
|
||||||
}else {
|
}else {
|
||||||
client_map(c);
|
client_map(c);
|
||||||
if((frame_resized = !eqrect(c->framewin->r, f->r)))
|
reshapewin(c->framewin, f->r);
|
||||||
reshapewin(c->framewin, f->r);
|
reshapewin(&c->w, f->crect);
|
||||||
if((client_resized = !eqrect(c->w.r, f->crect)))
|
|
||||||
reshapewin(&c->w, f->crect);
|
|
||||||
map_frame(c);
|
map_frame(c);
|
||||||
if(client_resized || frame_resized)
|
if(!eqrect(c->r, c->configr))
|
||||||
client_configure(c);
|
client_configure(c);
|
||||||
ewmh_framesize(c);
|
ewmh_framesize(c);
|
||||||
}
|
}
|
||||||
@ -603,6 +601,7 @@ void
|
|||||||
client_configure(Client *c) {
|
client_configure(Client *c) {
|
||||||
Rectangle r;
|
Rectangle r;
|
||||||
|
|
||||||
|
c->configr = c->r;
|
||||||
r = rectsubpt(c->r, Pt(c->border, c->border));
|
r = rectsubpt(c->r, Pt(c->border, c->border));
|
||||||
|
|
||||||
sendevent(&c->w, false, StructureNotifyMask,
|
sendevent(&c->w, false, StructureNotifyMask,
|
||||||
|
@ -25,8 +25,8 @@
|
|||||||
|
|
||||||
enum {
|
enum {
|
||||||
PingTime = 10000,
|
PingTime = 10000,
|
||||||
PingPeriod = 2000,
|
PingPeriod = 4000,
|
||||||
PingPartition = 20,
|
PingPartition = 10,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum IncMode {
|
enum IncMode {
|
||||||
@ -162,6 +162,7 @@ struct Client {
|
|||||||
Strut* strut;
|
Strut* strut;
|
||||||
Cursor cursor;
|
Cursor cursor;
|
||||||
Rectangle r;
|
Rectangle r;
|
||||||
|
Rectangle configr;
|
||||||
char** retags;
|
char** retags;
|
||||||
char name[256];
|
char name[256];
|
||||||
char tags[256];
|
char tags[256];
|
||||||
|
@ -217,7 +217,7 @@ event_client_clientmessage(Window *w, void *aux, XClientMessageEvent *e) {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
Dprint(DEwmh, "\tsource: %ld\n", l[0]);
|
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);
|
Dprint(DEwmh, "\tclient: %C\n", c);
|
||||||
if(l[0] == SourceClient && abs(event_xtime - l[1]) > 5000)
|
if(l[0] == SourceClient && abs(event_xtime - l[1]) > 5000)
|
||||||
return false;
|
return false;
|
||||||
@ -229,7 +229,7 @@ event_client_clientmessage(Window *w, void *aux, XClientMessageEvent *e) {
|
|||||||
if(e->format != 32)
|
if(e->format != 32)
|
||||||
return false;
|
return false;
|
||||||
Dprint(DEwmh, "\tsource: %ld\n", l[0]);
|
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);
|
client_kill(c, true);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -389,7 +389,7 @@ readctl_client(Client *c) {
|
|||||||
bufprint("fullscreen %d\n", c->fullscreen);
|
bufprint("fullscreen %d\n", c->fullscreen);
|
||||||
else
|
else
|
||||||
bufprint("fullscreen off\n");
|
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("tags %s\n", c->tags);
|
||||||
bufprint("urgent %s\n", TOGGLE(c->urgent));
|
bufprint("urgent %s\n", TOGGLE(c->urgent));
|
||||||
return buffer;
|
return buffer;
|
||||||
|
Loading…
Reference in New Issue
Block a user