[hackers] [dwm] made tile simplier

From: Anselm R. Garbe <garbeam_AT_gmail.com>
Date: Mon Aug 13 19:24:43 2007

changeset: 947:970931b7dd30
user: Anselm R. Garbe <garbeam_AT_gmail.com>
date: Mon Aug 13 19:19:38 2007 +0200
summary: made tile simplier

diff -r b938876de936 -r 970931b7dd30 tile.c
--- a/tile.c Mon Aug 13 19:13:54 2007 +0200
+++ b/tile.c Mon Aug 13 19:19:38 2007 +0200
@@ -39,31 +39,28 @@ tile(void) {
 
         nx = wax;
         ny = way;
- for(i = 0, c = clients; c; c = c->next)
- if(isvisible(c)) {
- if(c->isfloating)
- continue;
- c->ismax = False;
- if(i == 0) { /* master */
- nw = mw - 2 * c->border;
- nh = wah - 2 * c->border;
+ for(i = 0, c = nexttiled(clients); c; c = nexttiled(c->next)) {
+ c->ismax = False;
+ if(i == 0) { /* master */
+ nw = mw - 2 * c->border;
+ nh = wah - 2 * c->border;
+ }
+ else { /* tile window */
+ if(i == 1) {
+ ny = way;
+ nx += mw;
                         }
- else { /* tile window */
- if(i == 1) {
- ny = way;
- nx += mw;
- }
- nw = waw - mw - 2 * c->border;
- if(i + 1 == n) /* remainder */
- nh = (way + wah) - ny - 2 * c->border;
- else
- nh = th - 2 * c->border;
- }
- resize(c, nx, ny, nw, nh, False);
- if(n > 1 && th != wah)
- ny += nh + 2 * c->border;
- i++;
+ nw = waw - mw - 2 * c->border;
+ if(i + 1 == n) /* remainder */
+ nh = (way + wah) - ny - 2 * c->border;
+ else
+ nh = th - 2 * c->border;
                 }
+ resize(c, nx, ny, nw, nh, False);
+ if(n > 1 && th != wah)
+ ny += nh + 2 * c->border;
+ i++;
+ }
 }
 
 void
Received on Mon Aug 13 2007 - 19:24:43 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:57:52 UTC