dwm-meillo
diff main.c @ 77:38c8f7f7d401
sanitized other stuff
author | Anselm R. Garbe <garbeam@wmii.de> |
---|---|
date | Sat, 15 Jul 2006 17:19:19 +0200 |
parents | 4bd49f404f10 |
children | 0d71fb80b592 |
line diff
1.1 --- a/main.c Sat Jul 15 17:00:56 2006 +0200 1.2 +++ b/main.c Sat Jul 15 17:19:19 2006 +0200 1.3 @@ -16,10 +16,10 @@ 1.4 1.5 Display *dpy; 1.6 Window root, barwin; 1.7 -Atom wm_atom[WMLast], net_atom[NetLast]; 1.8 +Atom wmatom[WMLast], netatom[NetLast]; 1.9 Cursor cursor[CurLast]; 1.10 Bool running = True; 1.11 -Bool issel; 1.12 +Bool issel = True; 1.13 1.14 int tsel = Tdev; /* default tag */ 1.15 int screen, sx, sy, sw, sh, bx, by, bw, bh, mw; 1.16 @@ -30,8 +30,6 @@ 1.17 Client *sel = NULL; 1.18 1.19 static Bool otherwm; 1.20 -static const char version[] = 1.21 - "dwm-" VERSION ", (C)opyright MMVI Anselm R. Garbe\n"; 1.22 static int (*xerrorxlib)(Display *, XErrorEvent *); 1.23 1.24 /* static functions */ 1.25 @@ -109,12 +107,12 @@ 1.26 int protos = 0; 1.27 int i; 1.28 1.29 - res = win_property(w, wm_atom[WMProtocols], XA_ATOM, 20L, &protocols); 1.30 + res = win_property(w, wmatom[WMProtocols], XA_ATOM, 20L, &protocols); 1.31 if(res <= 0) { 1.32 return protos; 1.33 } 1.34 for(i = 0; i < res; i++) { 1.35 - if(protocols[i] == wm_atom[WMDelete]) 1.36 + if(protocols[i] == wmatom[WMDelete]) 1.37 protos |= WM_PROTOCOL_DELWIN; 1.38 } 1.39 free((char *) protocols); 1.40 @@ -184,7 +182,8 @@ 1.41 for(i = 1; (i < argc) && (argv[i][0] == '-'); i++) { 1.42 switch (argv[i][1]) { 1.43 case 'v': 1.44 - fprintf(stdout, "%s", version); 1.45 + fprintf(stdout, "%s", 1.46 + "dwm-"VERSION", (C)opyright MMVI Anselm R. Garbe\n"); 1.47 exit(0); 1.48 break; 1.49 default: 1.50 @@ -214,12 +213,12 @@ 1.51 xerrorxlib = XSetErrorHandler(xerror); 1.52 1.53 /* init atoms */ 1.54 - wm_atom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False); 1.55 - wm_atom[WMDelete] = XInternAtom(dpy, "WM_DELETE_WINDOW", False); 1.56 - net_atom[NetSupported] = XInternAtom(dpy, "_NET_SUPPORTED", False); 1.57 - net_atom[NetWMName] = XInternAtom(dpy, "_NET_WM_NAME", False); 1.58 - XChangeProperty(dpy, root, net_atom[NetSupported], XA_ATOM, 32, 1.59 - PropModeReplace, (unsigned char *) net_atom, NetLast); 1.60 + wmatom[WMProtocols] = XInternAtom(dpy, "WM_PROTOCOLS", False); 1.61 + wmatom[WMDelete] = XInternAtom(dpy, "WM_DELETE_WINDOW", False); 1.62 + netatom[NetSupported] = XInternAtom(dpy, "_NET_SUPPORTED", False); 1.63 + netatom[NetWMName] = XInternAtom(dpy, "_NET_WM_NAME", False); 1.64 + XChangeProperty(dpy, root, netatom[NetSupported], XA_ATOM, 32, 1.65 + PropModeReplace, (unsigned char *) netatom, NetLast); 1.66 1.67 /* init cursors */ 1.68 cursor[CurNormal] = XCreateFontCursor(dpy, XC_left_ptr);