about summary refs log tree commit diff
diff options
context:
space:
mode:
authorokan <okan>2011-03-22 10:52:37 +0000
committerokan <okan>2011-03-22 10:52:37 +0000
commit3ff303658c1baf85e5248138a62781c48760945c (patch)
tree86126cfa6c77bf87104bd43ffd00567e548cb2e1
parenta12fb346a2d45a046d69c78410c1afc5e7c311d2 (diff)
downloadcwm-3ff303658c1baf85e5248138a62781c48760945c.tar.gz
cwm-3ff303658c1baf85e5248138a62781c48760945c.tar.xz
cwm-3ff303658c1baf85e5248138a62781c48760945c.zip
while this piece deals with client argv's in a seemingly inefficient way
(noticed by Tim Peniket), since we don't ever do anything with cliarg,
remove the hunk and cliarg completely.

ok oga@
-rw-r--r--calmwm.h1
-rw-r--r--client.c26
2 files changed, 0 insertions, 27 deletions
diff --git a/calmwm.h b/calmwm.h
index 712a677..27fc91b 100644
--- a/calmwm.h
+++ b/calmwm.h
@@ -189,7 +189,6 @@ struct client_ctx {
 
 	char			*app_class;
 	char			*app_name;
-	char			*app_cliarg;
 };
 
 extern const char *shortcut_to_name[];
diff --git a/client.c b/client.c
index 57a1efe..a9838bc 100644
--- a/client.c
+++ b/client.c
@@ -807,8 +807,6 @@ static void
 client_gethints(struct client_ctx *cc)
 {
 	XClassHint		 xch;
-	int			 argc;
-	char			**argv;
 	struct mwm_hints	*mwmh;
 
 	if (XGetClassHint(X_Dpy, cc->win, &xch)) {
@@ -824,29 +822,6 @@ client_gethints(struct client_ctx *cc)
 		    !(mwmh->decorations & MWM_DECOR_ALL) &&
 		    !(mwmh->decorations & MWM_DECOR_BORDER))
 			cc->bwidth = 0;
-	if (XGetCommand(X_Dpy, cc->win, &argv, &argc)) {
-#define MAX_ARGLEN 512
-#define ARG_SEP_ " "
-		int	 i, o, len = MAX_ARGLEN;
-		char	*buf;
-
-		buf = xmalloc(len);
-		buf[0] = '\0';
-
-		for (o = 0, i = 0; o < len && i < argc; i++) {
-			if (argv[i] == NULL)
-				break;
-			strlcat(buf, argv[i], len);
-			o += strlen(buf);
-			strlcat(buf, ARG_SEP_, len);
-			o += strlen(ARG_SEP_);
-		}
-
-		if (strlen(buf) > 0)
-			cc->app_cliarg = buf;
-
-		XFreeStringList(argv);
-	}
 }
 
 static void
@@ -856,7 +831,6 @@ client_freehints(struct client_ctx *cc)
 		XFree(cc->app_name);
 	if (cc->app_class != NULL)
 		XFree(cc->app_class);
-	xfree(cc->app_cliarg);
 }
 
 static int