[hackers] [dwm] I prefer doing the check in showhide || Anselm R Garbe

From: <hg_AT_suckless.org>
Date: Sat, 6 Sep 2008 08:34:53 +0000 (UTC)

changeset: 1356:d2658eac8ff9
tag: tip
user: Anselm R Garbe <garbeam_AT_gmail.com>
date: Sat Sep 06 09:34:49 2008 +0100
files: dwm.c
description:
I prefer doing the check in showhide

diff -r 9172f2200001 -r d2658eac8ff9 dwm.c
--- a/dwm.c Sat Sep 06 09:21:32 2008 +0100
+++ b/dwm.c Sat Sep 06 09:34:49 2008 +0100
@@ -272,8 +272,7 @@
 
 void
 arrange(void) {
- if(stack)
- showhide(stack);
+ showhide(stack);
         focus(NULL);
         if(lt[sellt]->arrange)
                 lt[sellt]->arrange();
@@ -1369,15 +1368,18 @@
 
 void
 showhide(Client *c) {
+ if(!c)
+ return;
         if(ISVISIBLE(c)) { /* show clients top down */
                 XMoveWindow(dpy, c->win, c->x, c->y);
                 if(!lt[sellt]->arrange || c->isfloating)
                         resize(c, c->x, c->y, c->w, c->h, True);
+ showhide(c->snext);
         }
- if(c->snext) /* hide clients bottom up */
+ else { /* hide clients bottom up */
                 showhide(c->snext);
- if(!ISVISIBLE(c))
                 XMoveWindow(dpy, c->win, c->x + 2 * sw, c->y);
+ }
 }
 
 void
Received on Sat Sep 06 2008 - 08:34:53 UTC

This archive was generated by hypermail 2.2.0 : Sat Sep 06 2008 - 08:36:06 UTC