From 08ab650ce0d4d699e7e062d439ab6c8858bad65a Mon Sep 17 00:00:00 2001 From: Wynn Wolf Arbor Date: Wed, 18 Mar 2020 19:46:54 +0100 Subject: Remove matching on window title history Obscure feature. Confusing if you don't know about it, mostly useless if you do. Matching on currently visible window titles is enough. --- client.c | 31 ------------------------------- 1 file changed, 31 deletions(-) (limited to 'client.c') diff --git a/client.c b/client.c index b1c6894..676b40f 100644 --- a/client.c +++ b/client.c @@ -73,7 +73,6 @@ client_init(Window win, struct screen_ctx *sc) cc->stackingorder = 0; cc->initial_state = 0; memset(&cc->hint, 0, sizeof(cc->hint)); - TAILQ_INIT(&cc->nameq); cc->geom.x = wattr.x; cc->geom.y = wattr.y; @@ -209,7 +208,6 @@ void client_remove(struct client_ctx *cc) { struct screen_ctx *sc = cc->sc; - struct winname *wn; TAILQ_REMOVE(&sc->clientq, cc, entry); @@ -219,12 +217,6 @@ client_remove(struct client_ctx *cc) if (cc->flags & CLIENT_ACTIVE) xu_ewmh_net_active_window(sc, None); - while ((wn = TAILQ_FIRST(&cc->nameq)) != NULL) { - TAILQ_REMOVE(&cc->nameq, wn, entry); - free(wn->name); - free(wn); - } - free(cc->name); free(cc->label); free(cc->res_class); @@ -661,33 +653,10 @@ client_close(struct client_ctx *cc) void client_set_name(struct client_ctx *cc) { - struct winname *wn, *wnnxt; - int i = 0; - free(cc->name); if (!xu_get_strprop(cc->win, ewmh[_NET_WM_NAME], &cc->name)) if (!xu_get_strprop(cc->win, XA_WM_NAME, &cc->name)) cc->name = xstrdup(""); - - TAILQ_FOREACH_SAFE(wn, &cc->nameq, entry, wnnxt) { - if (strcmp(wn->name, cc->name) == 0) { - TAILQ_REMOVE(&cc->nameq, wn, entry); - free(wn->name); - free(wn); - } - i++; - } - wn = xmalloc(sizeof(*wn)); - wn->name = xstrdup(cc->name); - TAILQ_INSERT_TAIL(&cc->nameq, wn, entry); - - /* Garbage collection. */ - if ((i + 1) > Conf.nameqlen) { - wn = TAILQ_FIRST(&cc->nameq); - TAILQ_REMOVE(&cc->nameq, wn, entry); - free(wn->name); - free(wn); - } } static void -- cgit v1.2.3-2-gb3c3