mirror of
https://github.com/0intro/wmii
synced 2024-12-16 00:22:37 +03:00
fixed pseudo-zombie frames reported by bogon
This commit is contained in:
parent
82ee249743
commit
9cfed5dfc8
@ -150,7 +150,9 @@ focus_client(Client *c, Bool fevent)
|
||||
void
|
||||
map_client(Client * c)
|
||||
{
|
||||
XSelectInput(dpy, c->win, CLIENT_MASK & ~StructureNotifyMask);
|
||||
XMapRaised(dpy, c->win);
|
||||
XSelectInput(dpy, c->win, CLIENT_MASK);
|
||||
set_client_state(c, NormalState);
|
||||
}
|
||||
|
||||
@ -158,15 +160,18 @@ void
|
||||
unmap_client(Client * c)
|
||||
{
|
||||
ungrab_mouse(c->win, AnyModifier, AnyButton);
|
||||
XSelectInput(dpy, c->win, CLIENT_MASK & ~StructureNotifyMask);
|
||||
XUnmapWindow(dpy, c->win);
|
||||
XSelectInput(dpy, c->win, CLIENT_MASK);
|
||||
set_client_state(c, WithdrawnState);
|
||||
}
|
||||
|
||||
void
|
||||
reparent_client(Client *c, Window w, int x, int y)
|
||||
{
|
||||
XReparentWindow(dpy, c->win, w, x, y);
|
||||
c->ignore_unmap++;
|
||||
XSelectInput(dpy, c->win, CLIENT_MASK & ~StructureNotifyMask);
|
||||
XReparentWindow(dpy, c->win, w, x, y);
|
||||
XSelectInput(dpy, c->win, CLIENT_MASK);
|
||||
}
|
||||
|
||||
void
|
||||
@ -428,6 +433,7 @@ detach_client(Client *c, Bool unmap)
|
||||
c->rect.x = c->frame.rect.x;
|
||||
c->rect.y = c->frame.rect.y;
|
||||
reparent_client(c, root, c->rect.x, c->rect.y);
|
||||
XUnmapWindow(dpy, c->frame.win);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -191,6 +191,7 @@ handle_destroynotify(XEvent *e)
|
||||
XDestroyWindowEvent *ev = &e->xdestroywindow;
|
||||
Client *c = win_to_client(ev->window);
|
||||
if(c) {
|
||||
fprintf(stderr, "destroy: %s\n", c->name);
|
||||
c->destroyed = True;
|
||||
detach_client(c, False);
|
||||
}
|
||||
@ -282,11 +283,9 @@ handle_unmapnotify(XEvent *e)
|
||||
XUnmapEvent *ev = &e->xunmap;
|
||||
Client *c;
|
||||
if((c = win_to_client(ev->window))) {
|
||||
if(!c->ignore_unmap)
|
||||
detach_client(c, True);
|
||||
else
|
||||
c->ignore_unmap--;
|
||||
}
|
||||
fprintf(stderr, "unmap %s\n", c->name);
|
||||
detach_client(c, True);
|
||||
}
|
||||
}
|
||||
|
||||
static void handle_clientmessage(XEvent *e)
|
||||
|
@ -361,7 +361,6 @@ scan_wins()
|
||||
if(wa.map_state == IsViewable) {
|
||||
c = alloc_client(wins[i], &wa);
|
||||
attach_client(c);
|
||||
c->ignore_unmap++; /* was viewable already */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -83,7 +83,6 @@ struct Client {
|
||||
char name[256];
|
||||
int proto;
|
||||
unsigned int border;
|
||||
unsigned int ignore_unmap;
|
||||
Bool destroyed;
|
||||
Bool maximized;
|
||||
Area *area;
|
||||
|
Loading…
Reference in New Issue
Block a user