menu.c
changeset 5 e5018cae273f
parent 4 991bd8b0771e
child 6 e0cefb3981c8
--- a/menu.c	Mon Jul 10 19:47:35 2006 +0200
+++ b/menu.c	Mon Jul 10 22:16:48 2006 +0200
@@ -53,7 +53,7 @@
 
 static Brush brush = {0};
 
-static void draw_menu(void);
+static void draw_menu();
 static void kpress(XKeyEvent * e);
 
 static char version[] = "gridmenu - " VERSION ", (C)opyright MMVI Anselm R. Garbe\n";
@@ -397,11 +397,10 @@
 
 	wa.override_redirect = 1;
 	wa.background_pixmap = ParentRelative;
-	wa.event_mask = ExposureMask | ButtonPressMask | KeyPressMask
-		| SubstructureRedirectMask | SubstructureNotifyMask;
+	wa.event_mask = ExposureMask | ButtonPressMask | KeyPressMask;
 
 	rect.width = DisplayWidth(dpy, screen);
-	rect.height = brush.font.height + 4;
+	rect.height = labelheight(&brush.font);
 	rect.y = DisplayHeight(dpy, screen) - rect.height;
 	rect.x = 0;
 
@@ -413,7 +412,7 @@
 	XFlush(dpy);
 
 	/* pixmap */
-	brush.gc = XCreateGC(dpy, win, 0, 0);
+	brush.gc = XCreateGC(dpy, root, 0, 0);
 	brush.drawable = XCreatePixmap(dpy, win, rect.width, rect.height,
 			DefaultDepth(dpy, screen));
 	XFlush(dpy);