summaryrefslogtreecommitdiffstats
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
parentadded new stuff (diff)
downloaddwm-39677ec76616fe4165ef92afb14db2bef2488e30.tar.gz
dwm-39677ec76616fe4165ef92afb14db2bef2488e30.zip
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 @@
13 13
14#include "wm.h" 14#include "wm.h"
15 15
16/* X structs */
16Display *dpy; 17Display *dpy;
17Window root; 18Window root;
18XRectangle rect; 19XRectangle rect;
19int screen, sel_screen; 20Pixmap pmap;
20Atom wm_atom[WMLast]; 21Atom wm_atom[WMLast];
21Atom net_atom[NetLast]; 22Atom net_atom[NetLast];
22Cursor cursor[CurLast]; 23Cursor cursor[CurLast];
24
25int screen, sel_screen;
23unsigned int kmask, numlock_mask; 26unsigned int kmask, numlock_mask;
24Pixmap pmap; 27
28/* draw structs */
29Brush brush = {0};
25 30
26enum { WM_PROTOCOL_DELWIN = 1 }; 31enum { WM_PROTOCOL_DELWIN = 1 };
27 32
@@ -208,7 +213,7 @@ main(int argc, char *argv[])
208 XSetErrorHandler(startup_error_handler); 213 XSetErrorHandler(startup_error_handler);
209 /* this causes an error if some other WM is running */ 214 /* this causes an error if some other WM is running */
210 XSelectInput(dpy, root, SubstructureRedirectMask); 215 XSelectInput(dpy, root, SubstructureRedirectMask);
211 XSync(dpy, False); 216 XFlush(dpy);
212 217
213 if(other_wm_running) 218 if(other_wm_running)
214 error("gridwm: another window manager is already running\n"); 219 error("gridwm: another window manager is already running\n");
@@ -246,6 +251,10 @@ main(int argc, char *argv[])
246 wa.cursor = cursor[CurNormal]; 251 wa.cursor = cursor[CurNormal];
247 XChangeWindowAttributes(dpy, root, CWEventMask | CWCursor, &wa); 252 XChangeWindowAttributes(dpy, root, CWEventMask | CWCursor, &wa);
248 253
254 /* style */
255 loadcolors(dpy, screen, &brush, BGCOLOR, FGCOLOR, BORDERCOLOR);
256 loadfont(dpy, &brush.font, FONT);
257
249 scan_wins(); 258 scan_wins();
250 259
251 cleanup(); 260 cleanup();