about summary refs log tree commit diff stats
path: root/wm.c
diff options
context:
space:
mode:
authorAnselm R. Garbe <garbeam@wmii.de>2006-07-10 19:46:24 +0200
committerAnselm R. Garbe <garbeam@wmii.de>2006-07-10 19:46:24 +0200
commit39677ec76616fe4165ef92afb14db2bef2488e30 (patch)
tree7ea1c021042b7d7da53660aa127af37847273a91 /wm.c
parent8a34fa50f75f4d6d8af234ac0c4f6d40b988d700 (diff)
downloaddwm-39677ec76616fe4165ef92afb14db2bef2488e30.tar.gz
several new changes, made gridmenu working
Diffstat (limited to 'wm.c')
-rw-r--r--wm.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/wm.c b/wm.c
index 4c4a513..c8bb0a4 100644
--- a/wm.c
+++ b/wm.c
@@ -13,15 +13,20 @@
 
 #include "wm.h"
 
+/* X structs */
 Display *dpy;
 Window root;
 XRectangle rect;
-int screen, sel_screen;
+Pixmap pmap;
 Atom wm_atom[WMLast];
 Atom net_atom[NetLast];
 Cursor cursor[CurLast];
+
+int screen, sel_screen;
 unsigned int kmask, numlock_mask;
-Pixmap pmap;
+
+/* draw structs */
+Brush brush = {0};
 
 enum { WM_PROTOCOL_DELWIN = 1 };
 
@@ -208,7 +213,7 @@ main(int argc, char *argv[])
 	XSetErrorHandler(startup_error_handler);
 	/* this causes an error if some other WM is running */
 	XSelectInput(dpy, root, SubstructureRedirectMask);
-	XSync(dpy, False);
+	XFlush(dpy);
 
 	if(other_wm_running)
 		error("gridwm: another window manager is already running\n");
@@ -246,6 +251,10 @@ main(int argc, char *argv[])
 	wa.cursor = cursor[CurNormal];
 	XChangeWindowAttributes(dpy, root, CWEventMask | CWCursor, &wa);
 
+	/* style */
+	loadcolors(dpy, screen, &brush, BGCOLOR, FGCOLOR, BORDERCOLOR);
+	loadfont(dpy, &brush.font, FONT);
+
 	scan_wins();
 
 	cleanup();
' href='/akspecs/ranger/commit/README?h=v1.5.0&id=9e89f023907589291fa984e5caf099a8dc34733f'>9e89f023 ^
e952d6cb ^



9e89f023 ^


36e4e71e ^
20ab9343 ^








4ea0f69a ^

36e4e71e ^
e952d6cb ^
36e4e71e ^

78a7d762 ^
e952d6cb ^
78a7d762 ^
e952d6cb ^
4ea0f69a ^

7838675f ^








755e7df1 ^
7838675f ^
500cf259 ^



bf14a7e7 ^
500cf259 ^
7838675f ^
4ea0f69a ^

36e4e71e ^
e952d6cb ^


7582555b ^
e952d6cb ^
36e4e71e ^
e952d6cb ^




36e4e71e ^
a2853ab6 ^
e952d6cb ^
36e4e71e ^
6df94b8b ^
01c321b1 ^





6df94b8b ^
54717324 ^
d008817c ^


54717324 ^
d008817c ^
54717324 ^


01c321b1 ^

6df94b8b ^
01c321b1 ^

















6df94b8b ^
306c76d8 ^
e952d6cb ^

306c76d8 ^
e952d6cb ^


306c76d8 ^
e952d6cb ^
306c76d8 ^
e952d6cb ^

45cf5174 ^
e952d6cb ^

45cf5174 ^
b34fd133 ^
e952d6cb ^

45cf5174 ^
e952d6cb ^
45cf5174 ^
e952d6cb ^

45cf5174 ^
e952d6cb ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156