diff options
author | okan | 2011-03-22 10:52:37 +0000 |
---|---|---|
committer | okan | 2011-03-22 10:52:37 +0000 |
commit | a55116779436adb57bb0ddc4c750d261327d68b0 (patch) | |
tree | 7775583ad3e03867926c27736285df9af1a15bcc /client.c | |
parent | 235a8f52c8f74d78040514f71ba5664c913d6622 (diff) | |
download | cwm-a55116779436adb57bb0ddc4c750d261327d68b0.tar.gz |
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@
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 28 |
1 files changed, 1 insertions, 27 deletions
@@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: client.c,v 1.78 2011/03/22 10:49:46 okan Exp $ + * $Id: client.c,v 1.79 2011/03/22 10:52:37 okan Exp $ */ #include <sys/param.h> @@ -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 |