diff options
| author | Anselm R. Garbe <garbeam@wmii.de> | 2006-07-10 19:46:24 +0200 |
|---|---|---|
| committer | Anselm R. Garbe <garbeam@wmii.de> | 2006-07-10 19:46:24 +0200 |
| commit | 39677ec76616fe4165ef92afb14db2bef2488e30 (patch) | |
| tree | 7ea1c021042b7d7da53660aa127af37847273a91 /wm.c | |
| parent | added new stuff (diff) | |
| download | dwm-39677ec76616fe4165ef92afb14db2bef2488e30.tar.gz dwm-39677ec76616fe4165ef92afb14db2bef2488e30.zip | |
several new changes, made gridmenu working
Diffstat (limited to '')
| -rw-r--r-- | wm.c | 15 |
1 files changed, 12 insertions, 3 deletions
| @@ -13,15 +13,20 @@ | |||
| 13 | 13 | ||
| 14 | #include "wm.h" | 14 | #include "wm.h" |
| 15 | 15 | ||
| 16 | /* X structs */ | ||
| 16 | Display *dpy; | 17 | Display *dpy; |
| 17 | Window root; | 18 | Window root; |
| 18 | XRectangle rect; | 19 | XRectangle rect; |
| 19 | int screen, sel_screen; | 20 | Pixmap pmap; |
| 20 | Atom wm_atom[WMLast]; | 21 | Atom wm_atom[WMLast]; |
| 21 | Atom net_atom[NetLast]; | 22 | Atom net_atom[NetLast]; |
| 22 | Cursor cursor[CurLast]; | 23 | Cursor cursor[CurLast]; |
| 24 | |||
| 25 | int screen, sel_screen; | ||
| 23 | unsigned int kmask, numlock_mask; | 26 | unsigned int kmask, numlock_mask; |
| 24 | Pixmap pmap; | 27 | |
| 28 | /* draw structs */ | ||
| 29 | Brush brush = {0}; | ||
| 25 | 30 | ||
| 26 | enum { WM_PROTOCOL_DELWIN = 1 }; | 31 | enum { WM_PROTOCOL_DELWIN = 1 }; |
| 27 | 32 | ||
| @@ -208,7 +213,7 @@ main(int argc, char *argv[]) | |||
| 208 | XSetErrorHandler(startup_error_handler); | 213 | XSetErrorHandler(startup_error_handler); |
| 209 | /* this causes an error if some other WM is running */ | 214 | /* this causes an error if some other WM is running */ |
| 210 | XSelectInput(dpy, root, SubstructureRedirectMask); | 215 | XSelectInput(dpy, root, SubstructureRedirectMask); |
| 211 | XSync(dpy, False); | 216 | XFlush(dpy); |
| 212 | 217 | ||
| 213 | if(other_wm_running) | 218 | if(other_wm_running) |
| 214 | error("gridwm: another window manager is already running\n"); | 219 | error("gridwm: another window manager is already running\n"); |
| @@ -246,6 +251,10 @@ main(int argc, char *argv[]) | |||
| 246 | wa.cursor = cursor[CurNormal]; | 251 | wa.cursor = cursor[CurNormal]; |
| 247 | XChangeWindowAttributes(dpy, root, CWEventMask | CWCursor, &wa); | 252 | XChangeWindowAttributes(dpy, root, CWEventMask | CWCursor, &wa); |
| 248 | 253 | ||
| 254 | /* style */ | ||
| 255 | loadcolors(dpy, screen, &brush, BGCOLOR, FGCOLOR, BORDERCOLOR); | ||
| 256 | loadfont(dpy, &brush.font, FONT); | ||
| 257 | |||
| 249 | scan_wins(); | 258 | scan_wins(); |
| 250 | 259 | ||
| 251 | cleanup(); | 260 | cleanup(); |
