Dear tech@ readers,

I recently started to use cwm (which I'm appreciating for its simplicity) and, coming from a long dwm experience, I use the vtile/htile functions a lot.

I noticed that, imho, they break the group paradigm (maybe to the advanted of ewmh desktop usage in this case, which is partially broken in other situations, see e.g. [1]), since they only act on windows belonging to the same group of the active one:

1) open a window in group 1; only "window 1" will be visible;
2) switch to group 2 only and open a new window; only "window 2 will be visible; 3) toggle group 1 visibility; both "window 1" and "window 2" are now visible; 4) try "vtile" or "htile" functions: nothing happens, since there is only one client for each group.

In a situation like that, I'm expecting tile-shaping adjustment instead...

Would the following patch be suitable?

--- client.c.orig       Sun Aug 11 10:47:28 2019
+++ client.c    Sun Aug 11 10:50:20 2019
@@ -974,7 +974,7 @@
                return;
        i = n = 0;
- TAILQ_FOREACH(ci, &gc->clientq, group_entry) {
+       TAILQ_FOREACH(ci, &gc->clientq, entry) {
                if (ci->flags & CLIENT_HIDDEN ||
                    ci->flags & CLIENT_IGNORE || (ci == cc))
                        continue;
@@ -1003,7 +1003,7 @@
        x = area.x;
        w = area.w / n;
        h = area.h - mh;
-       TAILQ_FOREACH(ci, &gc->clientq, group_entry) {
+       TAILQ_FOREACH(ci, &gc->clientq, entry) {
                if (ci->flags & CLIENT_HIDDEN ||
                    ci->flags & CLIENT_IGNORE || (ci == cc))
                        continue;
@@ -1034,7 +1034,7 @@
                return;
        i = n = 0;
- TAILQ_FOREACH(ci, &gc->clientq, group_entry) {
+       TAILQ_FOREACH(ci, &gc->clientq, entry) {
                if (ci->flags & CLIENT_HIDDEN ||
                    ci->flags & CLIENT_IGNORE || (ci == cc))
                        continue;
@@ -1063,7 +1063,7 @@
        y = area.y;
        h = area.h / n;
        w = area.w - mw;
-       TAILQ_FOREACH(ci, &gc->clientq, group_entry) {
+       TAILQ_FOREACH(ci, &gc->clientq, entry) {
                if (ci->flags & CLIENT_HIDDEN ||
                    ci->flags & CLIENT_IGNORE || (ci == cc))
                        continue;


[1] https://marc.info/?l=openbsd-misc&m=148094411610762&w=2

--
Alessandro DE LAURENZIS
[mailto:[email protected]]
Web: http://www.atlantide.t28.net
LinkedIn: https://www.linkedin.com/in/delaurenzis/

Reply via email to