# HG changeset patch # User Anselm R. Garbe # Date 1179826144 -7200 # Node ID b940ac76c22f044c13983aef1663ba52f9b3a75b # Parent 3ece6b5b96474f261320c6b7884c19769695b768 applied Szabolcs proposal to simplify setlayout() diff -r 3ece6b5b9647 -r b940ac76c22f config.mk --- a/config.mk Mon May 21 14:37:26 2007 +0200 +++ b/config.mk Tue May 22 11:29:04 2007 +0200 @@ -1,5 +1,5 @@ # dwm version -VERSION = 4.1 +VERSION = 4.2 # Customize below to fit your system diff -r 3ece6b5b9647 -r b940ac76c22f layout.c --- a/layout.c Mon May 21 14:37:26 2007 +0200 +++ b/layout.c Tue May 22 11:29:04 2007 +0200 @@ -198,11 +198,9 @@ int i; if(!arg) { - for(i = 0; i < nlayouts && lt != &layout[i]; i++); - if(i == nlayouts - 1) - lt = &layout[0]; - else - lt = &layout[++i]; + lt++; + if(lt == layout + nlayouts) + lt = layout; } else { i = atoi(arg);