Re: [dwm] some opinions

From: Anselm R. Garbe <arg_AT_suckless.org>
Date: Sat, 27 Oct 2007 18:10:59 +0200

On Fri, Oct 26, 2007 at 07:12:24PM +0200, Robert Figura wrote:
> "Anselm R. Garbe" <arg_AT_suckless.org> wrote:
> > I consider the idea of having a Button struct for 4.7.
>
> Thank you for your reply Anselm.
>
> One thing made me curious; do you already have an idea how to adress
> this:?
>
> >> How to give a client * to a handler?

I'm not sure if I like the Button struct idea, because it
has a lot of impacts which are more complicated than shortcuts.
This is related to the fact that we need to grab/ungrab for
button events on client windows.

If it is only about defining what happens on Button1...3 press
on the bar window or on the selected client window, we could
think about such thing. Then I see two different structs, one

Button barclick[] {...};

and one

Button clientclick[] {...};

Because in any case, the focus model should not be changed. So a
client button handler can rely on sel.

> >> ... needs the only three global variables
> >> that aren't available at the inclusion of config.h.
>
> Let me rephrase it. The variables ntags, seltags[] and prevtags[]
> aren't available for extension in a .c file included from config.h. Is
> this policy (you don't want the people to write their own view()
> routine) or do you, as it may not be, care at all?

Well, I consider moving those definitions to config.h right after
the tags definition in 4.7, then there won't be any exceptions
in the use of the variables and functions for any included
patch.

> There is one more point i'd like to know the rationale behind rejection:
>
> >> While testing with OJ Mixer i found something in configurerequest()
> >> which i would consider a bug. OJ Mixer has a button to toggle the size
> >> of it's window. I think arrange() really should be called there.
>
> In short: Why shouldn't the layout react on a client changing size?

Managed/tiled windows are should accept the size provided by the
arrange() - usually tile() - algorithm. The tile() algorithm
is not intended to provide any support for tiled windows
requesting a different size. From this point of view
configurerequest() works correctly. And there is no intention to
change this, because dwm won't toggle the size of OJ Mixer as
long as it is tiled. Hence a call to arrange would be useless,
because dwm tells OJ Mixer in an ICCCM-conformant way that
it doesn't accepts the configure request of OJ Mixer. If
the mixer application behaves incorrectly in your opinion,
than it seems to be broken. Thus I recommend you to define it as
a floating app.

> >> The other thing with resizehints is that the last client gets the
> >> benefit from the space saved. I'd like to layout the clients in reverse
> >> order but that'd mean more hacking than i'm currently willing to do.
>
> Don't know how it eluded me but clients are already doubly linked.
> Maybe i haven't seen it because i didn't notice any code using it...

Well at least detach() and focusprev() use the reverse pointers.

Regards,

-- 
 Anselm R. Garbe >< http://www.suckless.org/ >< GPG key: 0D73F361
Received on Sat Oct 27 2007 - 18:10:59 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:03:00 UTC