diff options
| author | Anselm R. Garbe <garbeam@wmii.de> | 2006-07-11 13:02:22 +0200 |
|---|---|---|
| committer | Anselm R. Garbe <garbeam@wmii.de> | 2006-07-11 13:02:22 +0200 |
| commit | 005362043d8b0bbf856f301c231d4f10c519b8c4 (patch) | |
| tree | 3901197bc7ec4ad48613683c34516c2fa8c6542e /wm.c | |
| parent | fixed several stuff (gridwm gets better and better) (diff) | |
| download | dwm-005362043d8b0bbf856f301c231d4f10c519b8c4.tar.gz dwm-005362043d8b0bbf856f301c231d4f10c519b8c4.zip | |
changed how manage client works
Diffstat (limited to '')
| -rw-r--r-- | wm.c | 9 |
1 files changed, 4 insertions, 5 deletions
| @@ -20,19 +20,18 @@ Atom net_atom[NetLast]; | |||
| 20 | Cursor cursor[CurLast]; | 20 | Cursor cursor[CurLast]; |
| 21 | XRectangle rect, barrect; | 21 | XRectangle rect, barrect; |
| 22 | Bool running = True; | 22 | Bool running = True; |
| 23 | Client *clients = NULL; | ||
| 24 | 23 | ||
| 25 | char *bartext, tag[256]; | 24 | char *bartext, tag[256]; |
| 26 | int screen, sel_screen; | 25 | int screen, sel_screen; |
| 27 | 26 | ||
| 28 | /* draw structs */ | ||
| 29 | Brush brush = {0}; | 27 | Brush brush = {0}; |
| 28 | Client *clients = NULL; | ||
| 30 | 29 | ||
| 31 | enum { WM_PROTOCOL_DELWIN = 1 }; | 30 | enum { WM_PROTOCOL_DELWIN = 1 }; |
| 32 | 31 | ||
| 33 | static Bool other_wm_running; | 32 | static Bool other_wm_running; |
| 34 | static int (*x_error_handler) (Display *, XErrorEvent *); | ||
| 35 | static char version[] = "gridwm - " VERSION ", (C)opyright MMVI Anselm R. Garbe\n"; | 33 | static char version[] = "gridwm - " VERSION ", (C)opyright MMVI Anselm R. Garbe\n"; |
| 34 | static int (*x_error_handler) (Display *, XErrorEvent *); | ||
| 36 | 35 | ||
| 37 | static void | 36 | static void |
| 38 | usage() | 37 | usage() |
| @@ -56,7 +55,7 @@ scan_wins() | |||
| 56 | if(wa.override_redirect || XGetTransientForHint(dpy, wins[i], &d1)) | 55 | if(wa.override_redirect || XGetTransientForHint(dpy, wins[i], &d1)) |
| 57 | continue; | 56 | continue; |
| 58 | if(wa.map_state == IsViewable) | 57 | if(wa.map_state == IsViewable) |
| 59 | manage(create_client(wins[i], &wa)); | 58 | manage(wins[i], &wa); |
| 60 | } | 59 | } |
| 61 | } | 60 | } |
| 62 | if(wins) | 61 | if(wins) |
| @@ -69,7 +68,7 @@ scan_wins() | |||
| 69 | * Other types of errors call Xlib's default error handler, which | 68 | * Other types of errors call Xlib's default error handler, which |
| 70 | * calls exit(). | 69 | * calls exit(). |
| 71 | */ | 70 | */ |
| 72 | static int | 71 | int |
| 73 | error_handler(Display *dpy, XErrorEvent *error) | 72 | error_handler(Display *dpy, XErrorEvent *error) |
| 74 | { | 73 | { |
| 75 | if(error->error_code == BadWindow | 74 | if(error->error_code == BadWindow |
