JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
disabling configure() during resize
[dwm.git] / view.c
diff --git a/view.c b/view.c
index 167a1c4..baa2ac6 100644 (file)
--- a/view.c
+++ b/view.c
@@ -202,7 +202,7 @@ restack(void) {
 
 void
 togglefloat(Arg *arg) {
-       if (!sel)
+       if (!sel || arrange == dofloat)
                return;
        sel->isfloat = !sel->isfloat;
        arrange();
@@ -233,17 +233,9 @@ view(Arg *arg) {
        unsigned int i;
 
        for(i = 0; i < ntags; i++)
-               seltag[i] = False;
-       seltag[arg->i] = True;
-       arrange();
-}
-
-void
-viewall(Arg *arg) {
-       unsigned int i;
-
-       for(i = 0; i < ntags; i++)
-               seltag[i] = True;
+               seltag[i] = (arg->i == -1) ? True : False;
+       if(arg->i >= 0 && arg->i < ntags)
+               seltag[arg->i] = True;
        arrange();
 }