wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit 38fa6c1f492b8d61c41a6c79309d29841d23bdb4
parent 83834ba9b3ecd9cd0a457c8981658f15dae3b113
Author: Anselm R. Garbe <garbeam@wmii.de>
Date:   Thu,  6 Apr 2006 08:09:22 +0200

proceeded with cleanup


Diffstat:
cmd/wm/wm.h | 17++++++++---------
cmd/wmiimenu.c | 15++++++---------
2 files changed, 14 insertions(+), 18 deletions(-)

diff --git a/cmd/wm/wm.h b/cmd/wm/wm.h @@ -167,20 +167,16 @@ typedef struct { unsigned int size; View **data; } ViewVector; -ViewVector view; -unsigned int sel; typedef struct { unsigned int size; Client **data; } ClientVector; -ClientVector client; typedef struct { unsigned int size; Key **data; } KeyVector; -KeyVector key; typedef struct { unsigned int size; @@ -192,10 +188,14 @@ typedef struct { unsigned int size; char **data; } TagVector; -TagVector tag; +/* global variables */ +ViewVector view; +unsigned int sel; +ClientVector client; +TagVector tag; +KeyVector key; Display *dpy; -IXPServer *ixps; int screen; Window root; XRectangle rect; @@ -207,12 +207,11 @@ Window barwin; GC bargc; XRectangle brect; Qid root_qid; - Default def; Atom wm_atom[WMLast]; - Cursor cursor[CurLast]; -unsigned int valid_mask, num_lock_mask; +unsigned int valid_mask; +unsigned int num_lock_mask; /* area.c */ Area *alloc_area(View *t); diff --git a/cmd/wmiimenu.c b/cmd/wmiimenu.c @@ -20,32 +20,29 @@ #include <blitz.h> #include <cext.h> +typedef struct { + unsigned int size; + char **data; +} ItemVector; + static Bool done = False; static int ret = 0; static char text[4096]; static Color selcolor; static Color normcolor; - static Display *dpy; static Window win; static XRectangle mrect; static int screen; - -typedef struct { - unsigned int size; - char **data; -} ItemVector; - static ItemVector allitem = {0}; static ItemVector item = {0}; - static int sel = -1; static unsigned int nextoff = 0; static unsigned int prevoff = 0; static unsigned int curroff = 0; static unsigned int cmdw = 0; static Draw draw = { 0 }; -static const int seek = 30; /* 30px */ +static const int seek = 30; /* 30px */ static void draw_menu(void); static void handle_kpress(XKeyEvent * e);