aboutsummaryrefslogtreecommitdiffstats
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();