tmoved floating to layout.c, kept tile.c outside - dwm - [fork] customized buil… | |
git clone git://src.adamsgaard.dk/dwm | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 0937cc78bf5d8855dcd757b18e10c7dd49e7a1ab | |
parent f6e41b0bc3a00a2c48a996e2da4ad84be9a719f7 | |
Author: Anselm R. Garbe <[email protected]> | |
Date: Sun, 12 Aug 2007 13:10:21 +0200 | |
moved floating to layout.c, kept tile.c outside | |
Diffstat: | |
M config.arg.h | 1 - | |
M config.default.h | 1 - | |
M config.mk | 4 ++-- | |
M dwm.h | 2 ++ | |
D float.c | 41 -----------------------------… | |
D float.h | 5 ----- | |
M layout.c | 37 +++++++++++++++++++++++++++++… | |
7 files changed, 41 insertions(+), 50 deletions(-) | |
--- | |
diff --git a/config.arg.h b/config.arg.h | |
t@@ -25,7 +25,6 @@ static Rule rule[] = { \ | |
/* layout(s) */ | |
#include "tile.h" | |
-#include "float.h" | |
#define LAYOUTS \ | |
static Layout layout[] = { \ | |
/* symbol function */ \ | |
diff --git a/config.default.h b/config.default.h | |
t@@ -26,7 +26,6 @@ static Rule rule[] = { \ | |
/* layout(s) */ | |
#include "tile.h" | |
-#include "float.h" | |
#define LAYOUTS \ | |
static Layout layout[] = { \ | |
/* symbol function */ \ | |
diff --git a/config.mk b/config.mk | |
t@@ -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 | |
t@@ -120,12 +120,14 @@ unsigned int textw(const char *text); /* return t… | |
void grabkeys(void); /* grab all keys defined in config… | |
/* layout.c */ | |
+void floating(void); /* arranges all windows floating, … | |
void focusclient(const char *arg); /* focuses next(1)/previous(-1) visi… | |
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 cl… | |
/* main.c */ | |
void updatebarpos(void); /* updates the bar position */ | |
diff --git a/float.c b/float.c | |
t@@ -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->isfix… | |
- 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->bo… | |
- } | |
- 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 | |
t@@ -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 cl… | |
diff --git a/layout.c b/layout.c | |
t@@ -14,6 +14,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; | |
t@@ -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->isfix… | |
+ 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->bo… | |
+ } | |
+ else | |
+ resize(sel, sel->rx, sel->ry, sel->rw, sel->rh, True); | |
+ drawstatus(); | |
+ while(XCheckMaskEvent(dpy, EnterWindowMask, &ev)); | |
+} |