Re: [hackers] [PATCH 4/8] drw: simplify color schemes

From: Markus Teich <>
Date: Mon, 23 May 2016 19:40:14 +0200

Hiltjo Posthuma wrote:
> I'm willing to apply your unification patches to dmenu and dwm, but can you
> make a patch for dwm/dmenu if it breaks it?

Heyho Hiltjo,

sorry, I don't quite get what you are referring to. If a regression with my
patch series turns up, of course I will fix it assuming that is what you meant.

> > -typedef struct {
> > - Clr *fg;
> > - Clr *bg;
> > - Clr *border;
> > -} ClrScheme;
> > +enum { ColFg, ColBg, ColCount }; /* Scm index */
> > +typedef XftColor *Scm;
> I don't like the typedef to a pointer here.

I wanted to clean up the unneeded nesting, but also keep the type naming scheme
(upper case letter - two lower case letters) consistent instead of just using
`XftColor *` in the interface. I am unsure about what the level of abstraction
should be in this non-library interface to the drw compilation unit. Could you
provide more insight in the reasoning behind your preference?

I can update the patch to either use XftColor directly or nesting like the

        typedef struct {
                XftColor col;
        } Clr;
        Clr *drw_scm_create(…);

I'd prefer to expose XftColor directly, since it avoids the additional layer and
I expect Xft to be used for a while before it is replaced in drw.

Received on Mon May 23 2016 - 19:40:14 CEST

This archive was generated by hypermail 2.3.0 : Mon May 23 2016 - 19:48:14 CEST