dwm-meillo
diff wm.c @ 3:e969f3575b7a
several new changes, made gridmenu working
author | Anselm R. Garbe <garbeam@wmii.de> |
---|---|
date | Mon, 10 Jul 2006 19:46:24 +0200 |
parents | a79188fe4a40 |
children | e5018cae273f |
line diff
1.1 --- a/wm.c Mon Jul 10 18:35:39 2006 +0200 1.2 +++ b/wm.c Mon Jul 10 19:46:24 2006 +0200 1.3 @@ -13,15 +13,20 @@ 1.4 1.5 #include "wm.h" 1.6 1.7 +/* X structs */ 1.8 Display *dpy; 1.9 Window root; 1.10 XRectangle rect; 1.11 -int screen, sel_screen; 1.12 +Pixmap pmap; 1.13 Atom wm_atom[WMLast]; 1.14 Atom net_atom[NetLast]; 1.15 Cursor cursor[CurLast]; 1.16 + 1.17 +int screen, sel_screen; 1.18 unsigned int kmask, numlock_mask; 1.19 -Pixmap pmap; 1.20 + 1.21 +/* draw structs */ 1.22 +Brush brush = {0}; 1.23 1.24 enum { WM_PROTOCOL_DELWIN = 1 }; 1.25 1.26 @@ -208,7 +213,7 @@ 1.27 XSetErrorHandler(startup_error_handler); 1.28 /* this causes an error if some other WM is running */ 1.29 XSelectInput(dpy, root, SubstructureRedirectMask); 1.30 - XSync(dpy, False); 1.31 + XFlush(dpy); 1.32 1.33 if(other_wm_running) 1.34 error("gridwm: another window manager is already running\n"); 1.35 @@ -246,6 +251,10 @@ 1.36 wa.cursor = cursor[CurNormal]; 1.37 XChangeWindowAttributes(dpy, root, CWEventMask | CWCursor, &wa); 1.38 1.39 + /* style */ 1.40 + loadcolors(dpy, screen, &brush, BGCOLOR, FGCOLOR, BORDERCOLOR); 1.41 + loadfont(dpy, &brush.font, FONT); 1.42 + 1.43 scan_wins(); 1.44 1.45 cleanup();