aboutsummaryrefslogtreecommitdiffstats
path: root/client.c
diff options
context:
space:
mode:
authorokan2019-03-07 13:14:41 +0000
committerokan2019-03-07 13:14:41 +0000
commit39f6f479f6e5636dd0498d419a2172b9683f75ce (patch)
tree03ca887c30e655efdc249464f8aef91691225abb /client.c
parent3ac2ad35ec0bf84d329aff3ee68fd551d4e14fc9 (diff)
downloadcwm-39f6f479f6e5636dd0498d419a2172b9683f75ce.tar.gz
gc clientq inside groups, instead use the better maintained one per-screen
Diffstat (limited to 'client.c')
-rw-r--r--client.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/client.c b/client.c
index e86ded2..ef4a766 100644
--- a/client.c
+++ b/client.c
@@ -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.
*
- * $OpenBSD: client.c,v 1.252 2019/02/28 13:11:53 okan Exp $
+ * $OpenBSD: client.c,v 1.253 2019/03/07 13:14:41 okan Exp $
*/
#include <sys/types.h>
@@ -183,9 +183,6 @@ client_remove(struct client_ctx *cc)
if (cc->flags & CLIENT_ACTIVE)
xu_ewmh_net_active_window(sc, None);
- if (cc->gc != NULL)
- TAILQ_REMOVE(&cc->gc->clientq, cc, group_entry);
-
while ((wn = TAILQ_FIRST(&cc->nameq)) != NULL) {
TAILQ_REMOVE(&cc->nameq, wn, entry);
free(wn->name);
@@ -976,7 +973,9 @@ client_htile(struct client_ctx *cc)
cc->geom.x + cc->geom.w / 2,
cc->geom.y + cc->geom.h / 2, CWM_GAP);
- TAILQ_FOREACH(ci, &gc->clientq, group_entry) {
+ TAILQ_FOREACH(ci, &sc->clientq, entry) {
+ if (ci->gc != cc->gc)
+ continue;
if (ci->flags & CLIENT_HIDDEN ||
ci->flags & CLIENT_IGNORE || (ci == cc) ||
ci->geom.x < area.x ||
@@ -1005,7 +1004,9 @@ client_htile(struct client_ctx *cc)
x = area.x;
w = area.w / n;
h = area.h - mh;
- TAILQ_FOREACH(ci, &gc->clientq, group_entry) {
+ TAILQ_FOREACH(ci, &sc->clientq, entry) {
+ if (ci->gc != cc->gc)
+ continue;
if (ci->flags & CLIENT_HIDDEN ||
ci->flags & CLIENT_IGNORE || (ci == cc) ||
ci->geom.x < area.x ||
@@ -1044,7 +1045,9 @@ client_vtile(struct client_ctx *cc)
cc->geom.x + cc->geom.w / 2,
cc->geom.y + cc->geom.h / 2, CWM_GAP);
- TAILQ_FOREACH(ci, &gc->clientq, group_entry) {
+ TAILQ_FOREACH(ci, &sc->clientq, entry) {
+ if (ci->gc != cc->gc)
+ continue;
if (ci->flags & CLIENT_HIDDEN ||
ci->flags & CLIENT_IGNORE || (ci == cc) ||
ci->geom.x < area.x ||
@@ -1073,7 +1076,9 @@ client_vtile(struct client_ctx *cc)
y = area.y;
h = area.h / n;
w = area.w - mw;
- TAILQ_FOREACH(ci, &gc->clientq, group_entry) {
+ TAILQ_FOREACH(ci, &sc->clientq, entry) {
+ if (ci->gc != cc->gc)
+ continue;
if (ci->flags & CLIENT_HIDDEN ||
ci->flags & CLIENT_IGNORE || (ci == cc) ||
ci->geom.x < area.x ||