about summary refs log tree commit diff stats
path: root/event.c
diff options
context:
space:
mode:
Diffstat (limited to 'event.c')
-rw-r--r--event.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/event.c b/event.c
index 909012d..870ed4a 100644
--- a/event.c
+++ b/event.c
@@ -159,12 +159,8 @@ maprequest(XEvent *e)
 		return;
 	}
 
-	/*if(!client_of_win(ev->window))*/
-		/*manage(create_client(ev->window, &wa));*/
-	XMapRaised(dpy, ev->window);
-	XMoveResizeWindow(dpy, ev->window, rect.x, rect.y, rect.width, rect.height - barrect.height);
-	XSetInputFocus(dpy, ev->window, RevertToPointerRoot, CurrentTime);
-	XFlush(dpy);
+	if(!getclient(ev->window))
+		manage(ev->window, &wa);
 }
 
 static void
@@ -185,11 +181,9 @@ propertynotify(XEvent *e)
 static void
 unmapnotify(XEvent *e)
 {
-#if 0
 	Client *c;
 	XUnmapEvent *ev = &e->xunmap;
 
-	if((c = client_of_win(ev->window)))
-		destroy_client(c);
-#endif
+	if((c = getclient(ev->window)))
+		unmanage(c);
 }