JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
please recheck this patch with Mathematica from Wolfram Research - lemme know if...
[dwm.git] / event.c
diff --git a/event.c b/event.c
index 1da9a6b..9897640 100644 (file)
--- a/event.c
+++ b/event.c
@@ -225,19 +225,6 @@ 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;
@@ -314,7 +301,8 @@ maprequest(XEvent *e) {
 
        if(!XGetWindowAttributes(dpy, ev->window, &wa))
                return;
-       if(wa.override_redirect)
+       fprintf(stderr, "does the window suck? %s\n", wa.map_state == IsViewable ? "no" : "yes");
+       if(wa.override_redirect || wa.map_state != IsViewable)
                return;
        if(!getclient(ev->window))
                manage(ev->window, &wa);
@@ -363,7 +351,6 @@ void (*handler[LASTEvent]) (XEvent *) = {
        [ButtonPress] = buttonpress,
        [ConfigureRequest] = configurerequest,
        [ConfigureNotify] = configurenotify,
-/*     [CreateNotify] = createnotify, */
        [DestroyNotify] = destroynotify,
        [EnterNotify] = enternotify,
        [LeaveNotify] = leavenotify,