X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=event.c;h=1da9a6ba3ffd4d0d2d865135c597022cd0d5dcde;hb=c95bf3db9dcbf48428140bca6c2f86129977cc6c;hp=ce23e416e1441b8d23cd4749bdd0acebabf101e7;hpb=d934296476be7345842fec1a2630d1752c704078;p=dwm.git diff --git a/event.c b/event.c index ce23e41..1da9a6b 100644 --- a/event.c +++ b/event.c @@ -1,9 +1,4 @@ -/* © 2006-2007 Anselm R. Garbe - * © 2006-2007 Sander van Dijk - * © 2006-2007 Jukka Salmi - * © 2007 Premysl Hruby - * © 2007 Szabolcs Nagy - * See LICENSE file for license details. */ +/* See LICENSE file for copyright and license details. */ #include "dwm.h" #include #include @@ -230,6 +225,19 @@ configurenotify(XEvent *e) { } static void +createnotify(XEvent *e) { + static XWindowAttributes wa; + XCreateWindowEvent *ev = &e->xcreatewindow; + + if(!XGetWindowAttributes(dpy, ev->window, &wa)) + return; + if(wa.override_redirect) + return; + if(!getclient(ev->window) && (wa.map_state == IsViewable)) + manage(ev->window, &wa); +} + +static void destroynotify(XEvent *e) { Client *c; XDestroyWindowEvent *ev = &e->xdestroywindow; @@ -355,6 +363,7 @@ void (*handler[LASTEvent]) (XEvent *) = { [ButtonPress] = buttonpress, [ConfigureRequest] = configurerequest, [ConfigureNotify] = configurenotify, +/* [CreateNotify] = createnotify, */ [DestroyNotify] = destroynotify, [EnterNotify] = enternotify, [LeaveNotify] = leavenotify,