summaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--client.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/client.c b/client.c
index eb3acf4..ee659c4 100644
--- a/client.c
+++ b/client.c
@@ -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
199Client *
200gettitle(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
200Client * 209Client *
201getclient(Window w) 210getclient(Window w)