Subject: fvwm 2.1.1: StartsOnDesk -1 doesn't work

From: "Peter Daum" <[email-masked]>
Date: Fri, 20 Nov 1998 21:53:33 +0100 (MET)

Hi,

first of all, I'd like to say that I am very glad that the
development of fvwm now obviously is being continued - thank you
all!

I just tried fvwm 2.1.1 from the "testing" directory and found,
that the StartsOnDesk-Flag doesn't work anymore. I then tried the
current CVS-tree where this is mostly fixed, except for one
little bug: a desktop number of "-1" (perfectly legal according
to the documentation - and my favorite desk for a couple of
windows ;-) is ignored.

In add_window.c, PlaceWindow(..) is called with the specified desk
number + 1. In placement.c:441:

      else if ((tflag & STARTSONDESK_FLAG) && Desk && HonorStartsOnPage)

evaluates to false and the StartsOnDesk flag is ignored. Simplest
fix: just delete the "&& Desk" from that line - at least it looks
to me like it is superfluous.

Regards,
              Peter
-- 
     | Peter Daum ([email-masked])        __o   (+49 30)
     | http://www.cs.tu-berlin.de/~gator       _'\<_  691 46 35
     | pgp messages welcome!                 _(_)/(_) ___________

--
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: Fri, 20 Nov 1998 22:56:31 -0500 (EST)

"Peter Daum" <[email-masked]> wrote:
> I just tried...the current CVS-tree...:
> a desktop number of "-1" (perfectly legal according to the
> documentation - and my favorite desk for a couple of windows
> ;-) is ignored.

	Sorry; when I added the StartsOnPage style, I broke the special
case of desk number -1 (-2 would have worked). I'll work on a fix over
the weekend.

> to me like it is superfluous.

	Nope. Unfortunately, it's a good deal more complicated than that,
and this change would really break StartsOnPage.

	Under the new handling, the style structure carries the desk number
and the page x,y numbers as actual + 1, and a zero value (or, in your case,
-1 + 1) means "don't care". I'll have to change several spots in the code to
account for this case.

	It just never occurred to me that anyone would be using negative
desktop numbers, and I had to reserve some value for the "don't care" case.
I'll fix it. Thanks for catching this *now*, instead of after the formal
release went out.

	But now you've got my curiosity up. Why does -1 seem such a neat
desktop to use? It has no special meaning to X, nor does it to FVWM (with
this, er,  temporary exception).

- Bob

---

From: Bob Woodside <[email-masked]>
Date: Sat, 21 Nov 1998 01:57:12 -0500 (EST)

"Peter Daum" <[email-masked]> wrote:
> 
> I just tried...the current CVS-tree where...
> documentation - and my favorite desk for a couple of
> windows ;-) is ignored.

	The fix is checked in to CVS. Thanks for catching this!
(The x,y page coordinates for StartsOnPage can also be specified as
-1, though the results may be unnerving to novices!)

- Bob

---

From: "Peter Daum" <[email-masked]>
Date: Sat, 21 Nov 1998 10:24:51 +0100 (MET)

> this, er,  temporary exception).
[...]

Hi,

and thanks for that quick fix. Btw, I am not sure what a page
number of -1 would mean, but a desktop number of "-1" is really
pretty handy: if no desktop number is specified, the default is
"0". I have key bindings to "scroll" forward/backward one desktop,
and with that, "-1" is the immediate predecessor of the default
desktop...

regards,
            Peter

---

From: Bob Woodside <[email-masked]>
Date: Sat, 21 Nov 1998 13:17:06 -0500 (EST)

"Peter Daum" <[email-masked]> wrote:
> Btw, I am not sure what a page number of -1 would mean...

	It would actually make a "hidden" window. StartsOnPage 0 -1 0,
for example, would place the window one page to the left of the page
in the upper left hand corner of the virtual desktop (as viewed by
the Pager). The window would not be visible, and would not show up in
the Pager. You could only get to it by selecting it from the window
list. Perfectly legal, but probably confusing to most users. I hadn't
really thought about this, but now I'll have to see if I can think of
a good use for it.  :-)

> but a desktop number of "-1" is really pretty handy: if no desktop
> number is specified, the default is "0".

	Well, this is true at startup...otherwise, the default is the
current desk. Maybe we should think of 0 as the "home desk".

	This suggests a new wrinkle on the window placement issue,
though. A new style specification of StartsOnRelativePage might be
useful, where the numbers are interpreted relative to the current
desk/page position.

	[Sigh.] Maybe after the Great Style Flag Rewrite (TM)....

- Bob

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 23 Nov 1998 12:48:50 +0100

> useful, where the numbers are interpreted relative to the current

Hm, do you really think someone would use that? I can't imagine
why.

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, 23 Nov 1998 21:42:06 -0500 (EST)

Dominik Vogt <[email-masked]> wrote:
> > A new style specification of StartsOnRelativePage might be

	"If you build it, they will come."

	I can't imagine wanting it either. But Chuck taught me a long time ago
that I can't always assume my tastes are universal (even if they should be!)
That's why FVWM has so @^&@#&*!!! many options.

- Bob

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 24 Nov 1998 11:06:14 +0100

> That's why FVWM has so @^&@#&*!!! many options.

Yes, and that is part of the problem why we have very dirty
code in some parts. We're always trying to force in new stuff
and forget that nobody knows what's going on anymore. Take
the menu code or style.c. I doubt there is a living human
being that knows how it really works (ok, since I have written
the menu code recently I can still find my bearings therein,
but in six months the case may be another).

Bye

Dominik