Re: [dev] dwm 5.8.2 patches

From: v4hn <me_AT_v4hn.de>
Date: Wed, 16 Jun 2010 11:28:04 +0200

> On 15 June 2010 18:04, v4hn <me_AT_v4hn.de> wrote:
> > dwm-5.8.2 $ cat ../dwm-5.8.2-bstack.diff \
> >                ../dwm-5.8.2-fibonacci.diff \
> >                ../dwm-5.8.2-gridmode.diff \
> >                ../dwm-5.8.2-monocle_count.diff \
> >                ../dwm-5.8.2-pertag_without_bar.diff | patch -p1
> >
> > Last but not least in my current setup I see no point of
> > one showbar flag for each tag, while I really like pertag.
> > So I hacked pertag, to keep one boolean showbar,
> > while layout and mfact are stored per tag.

Two more things:

- The pertag-patch for 5.8.2 contains a bug concerning adding
monitors after setup() - lts for that monitor will not be initialized
properly resulting in a segfault.
patch is attached.(with and without bar per tag)

- Since there are Monitor structs the exact definition of Monitor using pertag
requires knowledge about the number of tags(for there is an array
of LENGTH(tags)+1 layouts in there).
Because tags is defined in config.h, the definition of struct Monitor had to be
moved below `#include "config.h"` - this is ugly, but I can't see
any way around this.
Problem is, it became a habit for layout-patches to add an include above the
array of layouts, like:

> +#include "bstack.c"
> static const Layout layouts[] = {

But since layout algorithms dereference a Monitor pointer, the exact
definition of Monitor has to be given before, else compilation fails.

Are there any ideas on how to resolve this cyclic dependency?
It would be nice to have a unified way of writing layout patches imho.

v4hn

Received on Wed Jun 16 2010 - 09:28:04 UTC

This archive was generated by hypermail 2.2.0 : Wed Jun 16 2010 - 09:36:01 UTC