37 #include <sys/wait.h> |
39 #include <sys/wait.h> |
38 #include <regex.h> |
40 #include <regex.h> |
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 |
46 /* macros */ |
47 /* macros */ |
47 #define BUTTONMASK (ButtonPressMask | ButtonReleaseMask) |
48 #define BUTTONMASK (ButtonPressMask | ButtonReleaseMask) |
52 enum { BarTop, BarBot, BarOff }; /* bar position */ |
53 enum { BarTop, BarBot, BarOff }; /* bar position */ |
53 enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */ |
54 enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */ |
54 enum { ColBorder, ColFG, ColBG, ColLast }; /* color */ |
55 enum { ColBorder, ColFG, ColBG, ColLast }; /* color */ |
55 enum { NetSupported, NetWMName, NetLast }; /* EWMH atoms */ |
56 enum { NetSupported, NetWMName, NetLast }; /* EWMH atoms */ |
56 enum { WMProtocols, WMDelete, WMName, WMState, WMLast };/* default atoms */ |
57 enum { WMProtocols, WMDelete, WMName, WMState, WMLast };/* default atoms */ |
57 |
|
58 /* typedefs */ |
|
59 typedef struct Client Client; |
|
60 |
|
61 struct 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 |
58 |
77 typedef struct { |
59 typedef struct { |
78 int x, y, w, h; |
60 int x, y, w, h; |
79 unsigned long norm[ColLast]; |
61 unsigned long norm[ColLast]; |
80 unsigned long sel[ColLast]; |
62 unsigned long sel[ColLast]; |