mirror of https://github.com/0intro/wmii
Stop windows with position hints from briefly appearing at (0,0). Unmap the frame windows immediately after clients die to prevent an empty frame from lingering under load.
This commit is contained in:
parent
85816736ec
commit
773d950f40
|
@ -296,8 +296,10 @@ place_frame(Frame *f) {
|
|||
|
||||
if(c->trans)
|
||||
return;
|
||||
if(c->fullscreen || c->w.hints->position || starting)
|
||||
if(c->fullscreen || c->w.hints->position || starting) {
|
||||
f->r = gravclient(c, c->w.r);
|
||||
return;
|
||||
}
|
||||
if(!field) {
|
||||
mx = Dx(screen->r) / dx;
|
||||
my = Dy(screen->r) / dy;
|
||||
|
|
|
@ -15,8 +15,6 @@
|
|||
|
||||
static Handlers handlers;
|
||||
|
||||
Rectangle gravclient(Client*, Rectangle);
|
||||
|
||||
enum {
|
||||
ClientMask =
|
||||
StructureNotifyMask
|
||||
|
@ -90,7 +88,6 @@ create_client(XWindow w, XWindowAttributes *wa) {
|
|||
|
||||
void
|
||||
manage_client(Client *c) {
|
||||
Rectangle r;
|
||||
Point p;
|
||||
Client *trans;
|
||||
char *tags;
|
||||
|
@ -104,23 +101,14 @@ manage_client(Client *c) {
|
|||
|
||||
free(tags);
|
||||
|
||||
r = c->w.r;
|
||||
p.x = def.border;
|
||||
p.y = labelh(def.font);
|
||||
reparentwindow(&c->w, c->framewin, p);
|
||||
|
||||
if(!strlen(c->tags))
|
||||
apply_rules(c);
|
||||
else
|
||||
if(c->tags[0])
|
||||
apply_tags(c, c->tags);
|
||||
|
||||
if(c->w.hints->position || starting) {
|
||||
r = gravclient(c, r);
|
||||
if(c->sel->area->floating)
|
||||
resize_client(c, &r);
|
||||
else
|
||||
c->sel->revert = r;
|
||||
}
|
||||
else
|
||||
apply_rules(c);
|
||||
|
||||
if(!starting)
|
||||
update_views();
|
||||
|
@ -145,6 +133,8 @@ destroy_client(Client *c) {
|
|||
|
||||
Debug fprintf(stderr, "client.c:destroy_client(%p) %s\n", c, c->name);
|
||||
|
||||
unmapwin(c->framewin);
|
||||
|
||||
for(tc=&client; *tc; tc=&(*tc)->next)
|
||||
if(*tc == c) {
|
||||
*tc = c->next;
|
||||
|
|
|
@ -32,6 +32,7 @@ void map_client(Client*);
|
|||
void unmap_client(Client*, int state);
|
||||
int map_frame(Client*);
|
||||
int unmap_frame(Client*);
|
||||
Rectangle gravclient(Client*, Rectangle);
|
||||
void fullscreen(Client*, Bool);
|
||||
void set_urgent(Client *, Bool urgent, Bool write);
|
||||
void set_cursor(Client*, Cursor);
|
||||
|
|
Loading…
Reference in New Issue