summaryrefslogtreecommitdiffstats
path: root/event.c
diff options
context:
space:
mode:
Diffstat (limited to 'event.c')
-rw-r--r--event.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/event.c b/event.c
index ad4e271..949812f 100644
--- a/event.c
+++ b/event.c
@@ -225,6 +225,19 @@ configurenotify(XEvent *e) {
225} 225}
226 226
227static void 227static void
228createnotify(XEvent *e) {
229 static XWindowAttributes wa;
230 XCreateWindowEvent *ev = &e->xcreatewindow;
231
232 if(!XGetWindowAttributes(dpy, ev->window, &wa))
233 return;
234 if(wa.override_redirect)
235 return;
236 if(!getclient(ev->window) && (wa.map_state == IsViewable))
237 manage(ev->window, &wa);
238}
239
240static void
228destroynotify(XEvent *e) { 241destroynotify(XEvent *e) {
229 Client *c; 242 Client *c;
230 XDestroyWindowEvent *ev = &e->xdestroywindow; 243 XDestroyWindowEvent *ev = &e->xdestroywindow;
@@ -350,6 +363,7 @@ void (*handler[LASTEvent]) (XEvent *) = {
350 [ButtonPress] = buttonpress, 363 [ButtonPress] = buttonpress,
351 [ConfigureRequest] = configurerequest, 364 [ConfigureRequest] = configurerequest,
352 [ConfigureNotify] = configurenotify, 365 [ConfigureNotify] = configurenotify,
366 [CreateNotify] = createnotify,
353 [DestroyNotify] = destroynotify, 367 [DestroyNotify] = destroynotify,
354 [EnterNotify] = enternotify, 368 [EnterNotify] = enternotify,
355 [LeaveNotify] = leavenotify, 369 [LeaveNotify] = leavenotify,