Subject: Re: Desk range problem

From: Bob Woodside <[email-masked]>
Date: Sun, 6 Dec 1998 21:10:56 -0500 (EST)

TG <[email-masked]> wrote:
> Hello,
> 
> # Desk arg1 [arg2] [min max]
> 
> Key Page_Up     A       M       Desk -1 1 0 3
> Key Page_Down   A       M       Desk 1 1 0 3
> 

	I see two problems in the beta code.

	First, I think the documentation needs a little revision. I
assumed the syntax you're using was valid, but after looking at the
code, I see that it's not. You can specify 1, 2, or 3 args, but not
all 4. 1 or 2 args are supposed to work the way the old Desk command
did (more on that later). To specify a range of allowable desks to
circulate among, you specify 3 args:

	1 - the relative desk no.
	2 - the minimum of the range
	3 - the maximum of the range

So the examples above are saying that the minimum desk no. is 1, and
the max is 0; and the fallback logic for an invalid range specification
ends up alternating between min and max, or 0 and 1.

	The other problem I see is that the case of just one argument
now works the opposite of what it used to, which I think was probably
not intentional, and should be changed. In other words, if there is only
one arg, it is interpreted as an absolute desk number rather than a
relative one.

	So, it looks like we need one documentation update and one small
code change - if I'm right about the intent of the change.

	I don't know who did the rewrite of changeDesks, but I'd rather
give the original author of the changes first shot at it - if he has
the time to fix it. Otherwise, I'll do something with it in the next
couple of days.

- Bob

--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 7 Dec 1998 12:53:08 +0100

> the time to fix it. Otherwise, I'll do something with it in the next

'twas me. First of all, I didn't change the behaviour with only one
argument (well I'm 90% sure) and second I think the 'old' behaviour
you mention was a bug (probably atoi called with NULL or an empty
string for the second parameter). I'd still appreciate if you make
these changes as you think fit. I don't know what it should be like.
I wrote some parsing function for desk numbers, so a change will
effect all commands referring to desks at once.

Bye

Dominik
-- 
Dominik Vogt, Hewlett-Packard GmbH, Dept. BVS
Herrenberger Str.130, 71034 Boeblingen, Germany
phone: 07031/14-4596, fax: 07031/14-3883, [email-masked]
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Bob Woodside <[email-masked]>
Date: Mon, 7 Dec 1998 22:56:43 -0500 (EST)

Dominik Vogt <[email-masked]> wrote:
> > ...if there is only one arg, it is interpreted as an absolute
> > desk number rather than a relative one.
> 
> ...I didn't change the behaviour with only one argument (well I'm
> 90% sure) and second I think the 'old' behaviour you mention was
> a bug...

	Whew! I finally figured out what was going on. Thanks to the
old parsing logic, etc., there was an inconsistency between the Desk
and WindowsDesk commands (changeDesk and changeWindowsDesk). Desk
took a single argument to be relative, and WindowsDesk took a single
argument to be absolute (probably because it originally took only one
argument in Version 1).

	This means we're going to break one or the other of these
commands (I don't see messing up the nice consistency of the new
parsing logic trying to preserve both, we just need to document the
change).

	I think that Desk is probably used much more often in people's
.fvwm2rc's than WindowsDesk, so I propose changing the single arg
behavior and the two spots in the Pager where the WindowsDesk command
is used (the function isn't invoked anywhere else in FVWM code).

	Does anyone on the list use the WindowsDesk command, or have
any strong feelings on the matter? If I don't hear any objections,
I'll make the change tomorrow evening. In the meantime, I'll see if
I can make the description in the man page a little less open to
misinterpretation.

- Bob

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 8 Dec 1998 13:15:23 +0100

> argument to be absolute (probably because it originally took only one

Good work.

> I can make the description in the man page a little less open to

Hmm, a while ago I created an 'alias' to WindowsDesk called
'MoveToDesk' (like 'MoveToPage') to have consistent naming.
This might be the right time to remove WindowsDesk completely?
Or perhaps mark it as obsolete?

Bye

Dominik

---

From: Bob Woodside <[email-masked]>
Date: Tue, 8 Dec 1998 10:04:15 -0500 (EST)

> Or perhaps mark it as obsolete?

	I like this idea. Pending any other suggestions, this
evening I'll change Pager to use MoveToDesk instead. 

	Any votes on whether we should drop WindowsDesk now,
or document that it is obsolete and will be removed in the
next production release?

- Bob