]> git.armaanb.net Git - dwm.git/commitdiff
moved floating to layout.c, kept tile.c outside
authorAnselm R. Garbe <garbeam@gmail.com>
Sun, 12 Aug 2007 11:10:21 +0000 (13:10 +0200)
committerAnselm R. Garbe <garbeam@gmail.com>
Sun, 12 Aug 2007 11:10:21 +0000 (13:10 +0200)
config.arg.h
config.default.h
config.mk
dwm.h
float.c [deleted file]
float.h [deleted file]
layout.c

index 9a5bdc61c6cb9e657ee7b7605b5ee7de39a66c4b..18be75bec0492301d3a952adc830bb5d37b5e16c 100644 (file)
@@ -25,7 +25,6 @@ static Rule rule[] = { \
 
 /* layout(s) */
 #include "tile.h"
-#include "float.h"
 #define LAYOUTS \
 static Layout layout[] = { \
        /* symbol               function */ \
index 83d244dfbc9759aec4ee2f20947a42f496c9336f..dcf13e380808085f7a3770b5b31dd5db6a7ec339 100644 (file)
@@ -26,7 +26,6 @@ static Rule rule[] = { \
 
 /* layout(s) */
 #include "tile.h"
-#include "float.h"
 #define LAYOUTS \
 static Layout layout[] = { \
        /* symbol               function */ \
index 6d8f1e8a1aaf5d6c27d5ce35667ffad72fc4f670..682bb41d60ba8051d233abf9bf9b37717b838119 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -3,8 +3,8 @@ VERSION = 4.4
 
 # Customize below to fit your system
 
-# layouts
-SRC = float.c tile.c
+# additional layouts beside floating
+SRC = tile.c
 
 # paths
 PREFIX = /usr/local
diff --git a/dwm.h b/dwm.h
index c2f1e7e0a4f01b6b6720369c3440f92cac98ce2a..760d67d628f5ac432649cc70ec54547a2d2af6b8 100644 (file)
--- a/dwm.h
+++ b/dwm.h
@@ -120,12 +120,14 @@ unsigned int textw(const char *text);     /* return the width of text in px*/
 void grabkeys(void);                   /* grab all keys defined in config.h */
 
 /* layout.c */
+void floating(void);                   /* arranges all windows floating, fallback layout  */
 void focusclient(const char *arg);     /* focuses next(1)/previous(-1) visible client */
 void initlayouts(void);                        /* initialize layout array */
 Client *nexttiled(Client *c);          /* returns tiled successor of c */
 void restack(void);                    /* restores z layers of all clients */
 void setlayout(const char *arg);       /* sets layout, NULL means next layout */
 void togglebar(const char *arg);       /* shows/hides the bar */
+void togglemax(const char *arg);       /* toggles maximization of floating client */
 
 /* main.c */
 void updatebarpos(void);               /* updates the bar position */
diff --git a/float.c b/float.c
deleted file mode 100644 (file)
index 25bec69..0000000
--- a/float.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* See LICENSE file for copyright and license details. */
-#include "dwm.h"
-
-/* extern */
-
-void
-floating(void) {
-       Client *c;
-
-       if(lt->arrange != floating)
-               return;
-
-       for(c = clients; c; c = c->next)
-               if(isvisible(c)) {
-                       unban(c);
-                       resize(c, c->x, c->y, c->w, c->h, True);
-               }
-               else
-                       ban(c);
-       focus(NULL);
-       restack();
-}
-
-void
-togglemax(const char *arg) {
-       XEvent ev;
-
-       if(!sel || (lt->arrange != floating && !sel->isfloating) || sel->isfixed)
-               return;
-       if((sel->ismax = !sel->ismax)) {
-               sel->rx = sel->x;
-               sel->ry = sel->y;
-               sel->rw = sel->w;
-               sel->rh = sel->h;
-               resize(sel, wax, way, waw - 2 * sel->border, wah - 2 * sel->border, True);
-       }
-       else
-               resize(sel, sel->rx, sel->ry, sel->rw, sel->rh, True);
-       drawstatus();
-       while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
-}
diff --git a/float.h b/float.h
deleted file mode 100644 (file)
index 6acbe64..0000000
--- a/float.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/* See LICENSE file for copyright and license details. */
-
-/* float.c */
-void floating(void);                   /* arranges all windows floating */
-void togglemax(const char *arg);       /* toggles maximization of floating client */
index 408a2a39406cbead25521b5ee14d0e8949cda653..fe12e1e3580baf866d75e3a0ccad073043eefd55 100644 (file)
--- a/layout.c
+++ b/layout.c
@@ -13,6 +13,24 @@ LAYOUTS
 
 /* extern */
 
+void
+floating(void) {
+       Client *c;
+
+       if(lt->arrange != floating)
+               return;
+
+       for(c = clients; c; c = c->next)
+               if(isvisible(c)) {
+                       unban(c);
+                       resize(c, c->x, c->y, c->w, c->h, True);
+               }
+               else
+                       ban(c);
+       focus(NULL);
+       restack();
+}
+
 void
 focusclient(const char *arg) {
        Client *c;
@@ -115,3 +133,22 @@ togglebar(const char *arg) {
        updatebarpos();
        lt->arrange();
 }
+
+void
+togglemax(const char *arg) {
+       XEvent ev;
+
+       if(!sel || (lt->arrange != floating && !sel->isfloating) || sel->isfixed)
+               return;
+       if((sel->ismax = !sel->ismax)) {
+               sel->rx = sel->x;
+               sel->ry = sel->y;
+               sel->rw = sel->w;
+               sel->rh = sel->h;
+               resize(sel, wax, way, waw - 2 * sel->border, wah - 2 * sel->border, True);
+       }
+       else
+               resize(sel, sel->rx, sel->ry, sel->rw, sel->rh, True);
+       drawstatus();
+       while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
+}