dwm-meillo

diff main.c @ 74:5370ef170cc9

sanitized names
author Anselm R. Garbe <garbeam@wmii.de>
date Fri, 14 Jul 2006 22:54:09 +0200
parents c2ddb9dbbd10
children f08271b7cb20
line diff
     1.1 --- a/main.c	Fri Jul 14 22:33:38 2006 +0200
     1.2 +++ b/main.c	Fri Jul 14 22:54:09 2006 +0200
     1.3 @@ -46,7 +46,7 @@
     1.4  static Bool other_wm_running;
     1.5  static const char version[] =
     1.6  	"dwm-" VERSION ", (C)opyright MMVI Anselm R. Garbe\n";
     1.7 -static int (*x_error_handler) (Display *, XErrorEvent *);
     1.8 +static int (*x_xerror) (Display *, XErrorEvent *);
     1.9  
    1.10  static void
    1.11  usage() {	error("usage: dwm [-v]\n"); }
    1.12 @@ -94,7 +94,7 @@
    1.13  }
    1.14  
    1.15  int
    1.16 -win_proto(Window w)
    1.17 +proto(Window w)
    1.18  {
    1.19  	unsigned char *protocols;
    1.20  	long res;
    1.21 @@ -114,7 +114,7 @@
    1.22  }
    1.23  
    1.24  void
    1.25 -send_message(Window w, Atom a, long value)
    1.26 +sendevent(Window w, Atom a, long value)
    1.27  {
    1.28  	XEvent e;
    1.29  
    1.30 @@ -135,7 +135,7 @@
    1.31   * calls exit().
    1.32   */
    1.33  int
    1.34 -error_handler(Display *dpy, XErrorEvent *error)
    1.35 +xerror(Display *dpy, XErrorEvent *error)
    1.36  {
    1.37  	if(error->error_code == BadWindow
    1.38  			|| (error->request_code == X_SetInputFocus
    1.39 @@ -153,7 +153,7 @@
    1.40  		return 0;
    1.41  	fprintf(stderr, "dwm: fatal error: request code=%d, error code=%d\n",
    1.42  			error->request_code, error->error_code);
    1.43 -	return x_error_handler(dpy, error); /* may call exit() */
    1.44 +	return x_xerror(dpy, error); /* may call exit() */
    1.45  }
    1.46  
    1.47  /*
    1.48 @@ -161,7 +161,7 @@
    1.49   * is already running.
    1.50   */
    1.51  static int
    1.52 -startup_error_handler(Display *dpy, XErrorEvent *error)
    1.53 +startup_xerror(Display *dpy, XErrorEvent *error)
    1.54  {
    1.55  	other_wm_running = True;
    1.56  	return -1;
    1.57 @@ -215,7 +215,7 @@
    1.58  
    1.59  	/* check if another WM is already running */
    1.60  	other_wm_running = False;
    1.61 -	XSetErrorHandler(startup_error_handler);
    1.62 +	XSetErrorHandler(startup_xerror);
    1.63  	/* this causes an error if some other WM is running */
    1.64  	XSelectInput(dpy, root, SubstructureRedirectMask);
    1.65  	XFlush(dpy);
    1.66 @@ -224,7 +224,7 @@
    1.67  		error("dwm: another window manager is already running\n");
    1.68  
    1.69  	XSetErrorHandler(0);
    1.70 -	x_error_handler = XSetErrorHandler(error_handler);
    1.71 +	x_xerror = XSetErrorHandler(xerror);
    1.72  
    1.73  	/* init atoms */
    1.74  	wm_atom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False);
    1.75 @@ -242,10 +242,10 @@
    1.76  	grabkeys();
    1.77  
    1.78  	/* style */
    1.79 -	dc.bg = initcolor(BGCOLOR);
    1.80 -	dc.fg = initcolor(FGCOLOR);
    1.81 -	dc.border = initcolor(BORDERCOLOR);
    1.82 -	initfont(FONT);
    1.83 +	dc.bg = getcolor(BGCOLOR);
    1.84 +	dc.fg = getcolor(FGCOLOR);
    1.85 +	dc.border = getcolor(BORDERCOLOR);
    1.86 +	setfont(FONT);
    1.87  
    1.88  	sx = sy = 0;
    1.89  	sw = DisplayWidth(dpy, screen);
    1.90 @@ -267,7 +267,7 @@
    1.91  
    1.92  	dc.drawable = XCreatePixmap(dpy, root, sw, bh, DefaultDepth(dpy, screen));
    1.93  	dc.gc = XCreateGC(dpy, root, 0, 0);
    1.94 -	draw_bar();
    1.95 +	drawstatus();
    1.96  
    1.97  	issel = XQueryPointer(dpy, root, &w, &w, &i, &i, &i, &i, &mask);
    1.98  
    1.99 @@ -315,7 +315,7 @@
   1.100  					stext[n++] = i;
   1.101  				}
   1.102  				stext[n] = 0;
   1.103 -				draw_bar();
   1.104 +				drawstatus();
   1.105  			}
   1.106  		}
   1.107  	}