diff options
| author | Anselm R. Garbe <garbeam@wmii.de> | 2006-07-12 00:00:25 +0200 |
|---|---|---|
| committer | Anselm R. Garbe <garbeam@wmii.de> | 2006-07-12 00:00:25 +0200 |
| commit | 2a0fc84c4af2257d79c4c7cb37131c4acb763162 (patch) | |
| tree | e335ce623b7f79186b52bc1d73acbfead90cab08 /client.c | |
| parent | fixed several other stuff, coming closer to something useful (diff) | |
| download | dwm-2a0fc84c4af2257d79c4c7cb37131c4acb763162.tar.gz dwm-2a0fc84c4af2257d79c4c7cb37131c4acb763162.zip | |
some more additions/fixes
Diffstat (limited to '')
| -rw-r--r-- | client.c | 13 |
1 files changed, 11 insertions, 2 deletions
| @@ -93,6 +93,7 @@ focus(Client *c) | |||
| 93 | } | 93 | } |
| 94 | XUnmapWindow(dpy, c->title); | 94 | XUnmapWindow(dpy, c->title); |
| 95 | draw_bar(); | 95 | draw_bar(); |
| 96 | discard_events(EnterWindowMask); | ||
| 96 | XFlush(dpy); | 97 | XFlush(dpy); |
| 97 | } | 98 | } |
| 98 | 99 | ||
| @@ -116,7 +117,7 @@ manage(Window w, XWindowAttributes *wa) | |||
| 116 | XGetTransientForHint(dpy, c->win, &c->trans); | 117 | XGetTransientForHint(dpy, c->win, &c->trans); |
| 117 | twa.override_redirect = 1; | 118 | twa.override_redirect = 1; |
| 118 | twa.background_pixmap = ParentRelative; | 119 | twa.background_pixmap = ParentRelative; |
| 119 | twa.event_mask = SubstructureNotifyMask | ExposureMask; | 120 | twa.event_mask = ExposureMask; |
| 120 | 121 | ||
| 121 | c->title = XCreateWindow(dpy, root, c->tx, c->ty, c->tw, c->th, | 122 | c->title = XCreateWindow(dpy, root, c->tx, c->ty, c->tw, c->th, |
| 122 | 0, DefaultDepth(dpy, screen), CopyFromParent, | 123 | 0, DefaultDepth(dpy, screen), CopyFromParent, |
| @@ -191,11 +192,19 @@ unmanage(Client *c) | |||
| 191 | XFlush(dpy); | 192 | XFlush(dpy); |
| 192 | XSetErrorHandler(error_handler); | 193 | XSetErrorHandler(error_handler); |
| 193 | XUngrabServer(dpy); | 194 | XUngrabServer(dpy); |
| 194 | discard_events(EnterWindowMask); | ||
| 195 | if(stack) | 195 | if(stack) |
| 196 | focus(stack); | 196 | focus(stack); |
| 197 | } | 197 | } |
| 198 | 198 | ||
| 199 | Client * | ||
| 200 | gettitle(Window w) | ||
| 201 | { | ||
| 202 | Client *c; | ||
| 203 | for(c = clients; c; c = c->next) | ||
| 204 | if(c->title == w) | ||
| 205 | return c; | ||
| 206 | return NULL; | ||
| 207 | } | ||
| 199 | 208 | ||
| 200 | Client * | 209 | Client * |
| 201 | getclient(Window w) | 210 | getclient(Window w) |
