cwm - vtile and htile functions not compatible with group paradigm?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

cwm - vtile and htile functions not compatible with group paradigm?

Alessandro DE LAURENZIS-3
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:[hidden email]]
Web: http://www.atlantide.t28.net
LinkedIn: https://www.linkedin.com/in/delaurenzis/

Reply | Threaded
Open this post in threaded view
|

Re: cwm - vtile and htile functions not compatible with group paradigm?

Okan Demirmen
On Sun 2019.08.11 at 11:28 +0200, Alessandro DE LAURENZIS wrote:

> 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?

BTW, your tree is considerably out-of-date.

Either way, it's the same issue/response that you refered to [1], but it
breaks that behaviour instead. Groups and ewmh workspaces are
incompatible, and cwm is not a tiling window manager; yes, the
traditional cwm "groups" can to go away, or ewmh desktops need to add
yet another layer. However if cwm groups change that much, it's no
longer cwm and eventually everyone coming from dwm will want to
re-create dwm in cwm (some of that already happened - imho a mistake
(even parts of ewmh break cwm's traditional behavior that some people
prefer (focus/warping issues))).

There is nothing wrong with using dwm if that's the desired behaviour.

> > --- 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:[hidden email]]
> Web: http://www.atlantide.t28.net
> LinkedIn: https://www.linkedin.com/in/delaurenzis/
>