about summary refs log tree commit diff stats
path: root/wm.c
diff options
context:
space:
mode:
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();
@invisible-island.net> 1996-09-02 19:39:24 -0400 committer Thomas E. Dickey <dickey@invisible-island.net> 1996-09-02 19:39:24 -0400 snapshot of project "lynx", label v2_6' href='/ingrix/lynx-snapshots/commit/src/HTAlert.h?id=e087f6d44e87f489fcb3056e86319ebba4218156'>e087f6d4
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