X-Git-Url: https://git.xinqibao.xyz/dwm.git/blobdiff_plain/bf357945070a9f4722b8dcbf61d61b34d1aae0aa..d34b4c7b9aaa4c8abadee6bc562ce4aef689e1f7:/main.c?ds=sidebyside

diff --git a/main.c b/main.c
index 27e2627..de59244 100644
--- a/main.c
+++ b/main.c
@@ -24,7 +24,7 @@ static void
 cleanup()
 {
 	while(sel) {
-		resize(sel, True);
+		resize(sel, True, TopLeft);
 		unmanage(sel);
 	}
 	XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime);
@@ -179,14 +179,13 @@ main(int argc, char *argv[])
 
 	for(i = 1; (i < argc) && (argv[i][0] == '-'); i++) {
 		switch (argv[i][1]) {
-		case 'v':
-			fprintf(stdout, "%s",
-					"dwm-"VERSION", (C)opyright MMVI Anselm R. Garbe\n");
-			exit(0);
-			break;
 		default:
 			eprint("usage: dwm [-v]\n");
 			break;
+		case 'v':
+			fputs("dwm-"VERSION", (C)opyright MMVI Anselm R. Garbe\n", stdout);
+			exit(EXIT_SUCCESS);
+			break;
 		}
 	}
 
@@ -262,6 +261,7 @@ main(int argc, char *argv[])
 	XChangeWindowAttributes(dpy, root, CWEventMask | CWCursor, &wa);
 
 	strcpy(stext, "dwm-"VERSION);
+
 	scan();
 
 	/* main event loop, reads status text from stdin as well */