[hackers] [wmii] Remove some cruft, arrange areas when adding clients, and make sure we don't map mapped clients and vice versa

From: Kris Maglione <jg_AT_suckless.org>
Date: Sat Feb 10 08:49:08 2007

changeset: 1826:7ee0323d67ca
user: Kris Maglione <jg_AT_suckless.org>
date: Sat Feb 10 02:44:57 2007 -0500
summary: Remove some cruft, arrange areas when adding clients, and make sure we don't map mapped clients and vice versa

diff -r 9158b6a6593e -r 7ee0323d67ca area.c
--- a/area.c Sat Feb 10 02:29:27 2007 -0500
+++ b/area.c Sat Feb 10 02:44:57 2007 -0500
@@ -155,6 +155,7 @@ attach_to_area(Area *a, Frame *f, Bool s
         else /* floating */
                 place_client(a, c);
 
+ arrange_column(a, False);
         focus_client(f->client, False);
 
         update_client_grab(f->client);
diff -r 9158b6a6593e -r 7ee0323d67ca client.c
--- a/client.c Sat Feb 10 02:29:27 2007 -0500
+++ b/client.c Sat Feb 10 02:44:57 2007 -0500
@@ -220,22 +220,26 @@ set_client_state(Client * c, int state)
 
 void
 map_client(Client *c) {
- XSelectInput(blz.dpy, c->win, CLIENT_MASK & ~StructureNotifyMask);
- XMapWindow(blz.dpy, c->win);
- XSelectInput(blz.dpy, c->win, CLIENT_MASK);
+ if(!c->mapped) {
+ XSelectInput(blz.dpy, c->win, CLIENT_MASK & ~StructureNotifyMask);
+ XMapWindow(blz.dpy, c->win);
+ XSelectInput(blz.dpy, c->win, CLIENT_MASK);
+ }
         set_client_state(c, NormalState);
         c->mapped = 1;
 }
 
 void
 unmap_client(Client *c, int state) {
- XSelectInput(blz.dpy, c->win, CLIENT_MASK & ~StructureNotifyMask);
- XUnmapWindow(blz.dpy, c->win);
- XSelectInput(blz.dpy, c->win, CLIENT_MASK);
+ if(c->mapped) {
+ XSelectInput(blz.dpy, c->win, CLIENT_MASK & ~StructureNotifyMask);
+ XUnmapWindow(blz.dpy, c->win);
+ XSelectInput(blz.dpy, c->win, CLIENT_MASK);
+ /* Always set this, since we don't care anymore once it's been destroyed */
+ c->unmapped++;
+ }
         set_client_state(c, state);
         c->mapped = 0;
- /* Always set this, since we don't care anymore once it's been destroyed */
- c->unmapped++;
 }
 
 void
diff -r 9158b6a6593e -r 7ee0323d67ca view.c
--- a/view.c Sat Feb 10 02:29:27 2007 -0500
+++ b/view.c Sat Feb 10 02:44:57 2007 -0500
@@ -153,7 +153,6 @@ attach_to_view(View *v, Frame *f) {
 attach_to_view(View *v, Frame *f) {
         Area *a;
         Client *c = f->client;
- unsigned int i;
 
         c->revert = nil;
         a = v->sel;
@@ -163,11 +162,6 @@ attach_to_view(View *v, Frame *f) {
         else if(starting && v->sel->floating)
                 v->sel = v->area->next;
         attach_to_area(v->sel, f, False);
- if(a != v->sel) {
- for(a=v->area, i = 0; a && a != v->sel; a=a->next, i++);
- if(i) write_event("ColumnFocus %d\n", i);
- else write_event("FocusFloating\n");
- }
 }
 
 void
Received on Sat Feb 10 2007 - 08:49:08 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:55:08 UTC