Re: [dwm] remembering client order in each tag

From: Sander van Dijk <a.h.vandijk_AT_gmail.com>
Date: Wed, 6 Sep 2006 20:23:54 +0200

On 9/6/06, Anthony Brown <agabrown_AT_xs4all.nl> wrote:
> The behaviour for the latest changeset (442) is, as I described before,
> basically they way I would expect (i.e. like) things to behave. I have
> now also verified that z-ordering for clients with a certain tag is also
> preserved after doing a view-all and switching back to viewing a single
> tag. The only slight problem remaining is the mod-tab behaviour. However
> this is only a minor irritant.

It's not just a minor irritant, it means that keyboard based focusing
is fundamentally broken now. Focus changes should _never_ have an
effect on client ordering. Currently, nextfocusing in floating mode
loops between the first two clients, which is a severe conceptual
error.

> The reason I like to have the z-order preservation is for working with
> floating clients that overlap. This happens for example when I work with
> an editor in combination with a graphing programme. It is no good to
> have plot windows managed in tiled mode as they should be of a certain
> size and shape to make the graphics readable. At the same time they may
> overlap with the editor and loosing the z-ordering when temporarily
> switching to xterms with a different tag becomes annoying after a while.

Like I said, z-ordering _is_ preserved in 1.4, it's just that when you
switch to a view that doesn't contain the currently focused client,
dwm will focus and _raise_ the newly focused window. So far, this is
the _only_ place where z-order is (non-manually) altered. You can
verify this by opening say 10 clients in a view and then switch
between tags. You'll see that the newly focused window is brought to
the top, but that _all_ the other windows retain their z-order.

Basically, the introduction of the nextfocusing problem indicates
mainly this: we're trying to fix something in the _wrong_place_. The
situation should be reverted to what it was like in 1.4, and dwm
should do something like this instead when switching to a view that
does not have the currenly selected client in it:

IF there's at least one tiled client
THEN focus the mastertile
ELSE if there are any floating clients
THEN focus the topmost window (rather than the first client in the clientlist)
ELSE put focus on the root window

That would fix both focus cycling _and_ your issue, and
_the_right_way_, I might add.

Sorry for sounding a little harsh, but I get a little prickly when
people call a severe conceptual mistake "just a minor irritant".
Client (focus) order and current z-order are _completely_unrelated_
and like a said earlier in this thread, tying them together is bound
to break at least one of the two...

Just to be clear: I'm trying to keep dwm from going the wrong way
here, not to hurt your feelings. My apologies if I did.

Greetings, Sander.
Received on Wed Sep 06 2006 - 20:23:55 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:30:59 UTC