changeset: 2147:3863bd1308a6
user: Kris Maglione <jg_AT_suckless.org>
date: Wed May 30 15:39:21 2007 -0400
summary: 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.
diff -r 81b04623ea56 -r 3863bd1308a6 cmd/wmii/area.c
--- a/cmd/wmii/area.c Tue May 29 15:28:52 2007 -0400
+++ b/cmd/wmii/area.c Wed May 30 15:39:21 2007 -0400
@@ -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;
diff -r 81b04623ea56 -r 3863bd1308a6 cmd/wmii/client.c
--- a/cmd/wmii/client.c Tue May 29 15:28:52 2007 -0400
+++ b/cmd/wmii/client.c Wed May 30 15:39:21 2007 -0400
@@ -14,8 +14,6 @@
#define Mbsearch(k, l, cmp) bsearch(k, l, nelem(l), sizeof(*l), cmp)
static Handlers handlers;
-
-Rectangle gravclient(Client*, Rectangle);
enum {
ClientMask =
@@ -90,7 +88,6 @@ create_client(XWindow w, XWindowAttribut
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))
+ if(c->tags[0])
+ apply_tags(c, c->tags);
+ else
apply_rules(c);
- else
- 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;
- }
if(!starting)
update_views();
@@ -144,6 +132,8 @@ destroy_client(Client *c) {
Bool hide;
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) {
diff -r 81b04623ea56 -r 3863bd1308a6 cmd/wmii/fns.h
--- a/cmd/wmii/fns.h Tue May 29 15:28:52 2007 -0400
+++ b/cmd/wmii/fns.h Wed May 30 15:39:21 2007 -0400
@@ -32,6 +32,7 @@ void unmap_client(Client*, int state);
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);
Received on Fri Jun 01 2007 - 03:10:50 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:57:10 UTC