summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--dwm.c22
-rw-r--r--dwm.h20
3 files changed, 23 insertions, 21 deletions
diff --git a/Makefile b/Makefile
index dee43ed..1dde4b2 100644
--- a/Makefile
+++ b/Makefile
@@ -35,7 +35,7 @@ clean:
35dist: clean 35dist: clean
36 @echo creating dist tarball 36 @echo creating dist tarball
37 @mkdir -p dwm-${VERSION} 37 @mkdir -p dwm-${VERSION}
38 @cp -R LICENSE Makefile README config.def.h config.mk \ 38 @cp -R LICENSE Makefile README config.def.h config.mk dwm.h \
39 dwm.1 ${SRC} dwm-${VERSION} 39 dwm.1 ${SRC} dwm-${VERSION}
40 @tar -cf dwm-${VERSION}.tar dwm-${VERSION} 40 @tar -cf dwm-${VERSION}.tar dwm-${VERSION}
41 @gzip dwm-${VERSION}.tar 41 @gzip dwm-${VERSION}.tar
diff --git a/dwm.c b/dwm.c
index a4447f6..cce68cb 100644
--- a/dwm.c
+++ b/dwm.c
@@ -25,6 +25,8 @@
25 * 25 *
26 * To understand everything else, start reading main(). 26 * To understand everything else, start reading main().
27 */ 27 */
28#include "dwm.h"
29
28#include <errno.h> 30#include <errno.h>
29#include <locale.h> 31#include <locale.h>
30#include <stdarg.h> 32#include <stdarg.h>
@@ -39,7 +41,6 @@
39#include <X11/cursorfont.h> 41#include <X11/cursorfont.h>
40#include <X11/keysym.h> 42#include <X11/keysym.h>
41#include <X11/Xatom.h> 43#include <X11/Xatom.h>
42#include <X11/Xlib.h>
43#include <X11/Xproto.h> 44#include <X11/Xproto.h>
44#include <X11/Xutil.h> 45#include <X11/Xutil.h>
45 46
@@ -55,25 +56,6 @@ enum { ColBorder, ColFG, ColBG, ColLast }; /* color */
55enum { NetSupported, NetWMName, NetLast }; /* EWMH atoms */ 56enum { NetSupported, NetWMName, NetLast }; /* EWMH atoms */
56enum { WMProtocols, WMDelete, WMName, WMState, WMLast };/* default atoms */ 57enum { WMProtocols, WMDelete, WMName, WMState, WMLast };/* default atoms */
57 58
58/* typedefs */
59typedef struct Client Client;
60
61struct Client {
62 char name[256];
63 int x, y, w, h;
64 int rx, ry, rw, rh; /* revert geometry */
65 int basew, baseh, incw, inch, maxw, maxh, minw, minh;
66 int minax, maxax, minay, maxay;
67 long flags;
68 unsigned int border, oldborder;
69 Bool isbanned, isfixed, ismax, isfloating, wasfloating;
70 Bool *tags;
71 Client *next;
72 Client *prev;
73 Client *snext;
74 Window win;
75};
76
77typedef struct { 59typedef struct {
78 int x, y, w, h; 60 int x, y, w, h;
79 unsigned long norm[ColLast]; 61 unsigned long norm[ColLast];
diff --git a/dwm.h b/dwm.h
new file mode 100644
index 0000000..10834f5
--- /dev/null
+++ b/dwm.h
@@ -0,0 +1,20 @@
1/* See LICENSE file for copyright and license details. */
2#include <X11/Xlib.h>
3
4/* typedefs */
5typedef struct Client Client;
6struct Client {
7 char name[256];
8 int x, y, w, h;
9 int rx, ry, rw, rh; /* revert geometry */
10 int basew, baseh, incw, inch, maxw, maxh, minw, minh;
11 int minax, maxax, minay, maxay;
12 long flags;
13 unsigned int border, oldborder;
14 Bool isbanned, isfixed, ismax, isfloating, wasfloating;
15 Bool *tags;
16 Client *next;
17 Client *prev;
18 Client *snext;
19 Window win;
20};