Subject: FVWM: How to keep the application on the page in which it was started ?

From: "Sauveron Damien" <[email-masked]>
Date: Wed, 6 Sep 2000 02:09:22 +0200

How to keep the application on the page in which it was started? 
For example, I launch Netscape in the page (1x1) and immediately before the window appear I go in the page (0x1). 
Netscape will appear in the page (0x1) whereas I wanted that it remains in the page (1x1).
How to configure Fvwm2 to solve this problem?

Thank you for your assistance.

Damien SAUVERON

---

From: Mikhael Goikhman <[email-masked]>
Date: Wed, 6 Sep 2000 04:32:02 +0200

> How to configure Fvwm2 to solve this problem?

I would suggest to use:

  Style Netscape StartsOnPage 1 1, SkipMapping

In case you want netscape to appear on the page you clicked, you should do
some programming, because there is no way to know backward about a page on
a click/enter time when a window is mapped.

It is possible to implement this in 2.3.19+ using special variables
$[vp.x], $[vp.y], $[vp.width], $[vp.height] (divide the first by the third
and the second by the forth to get page coordinates) and PipeRead+echo
to construct Style Netscape StartsOnPage <pagex> <pagey> command.
I think it would be good to have also ready to go $[page.nx], $[page.ny],
so PipeRead+echo is not needed in examples like this.

  DestroyFunc StartNetscapeOnTheCurrentPage
  AddToFunc   StartNetscapeOnTheCurrentPage
  + I PipeRead `echo Style Netscape StartsOnPage $$[$[vp.x]/$[vp.width]] \
  	$$[$[vp.y]/$[vp.height]], SkipMapping`
  + I Exec exec netscape

Bind StartNetscapeOnTheCurrentPage in your FvwmButtons or start netscape
using 'FvwmCommand StartNetscapeOnTheCurrentPage' shell command.

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

---

From: "Sauveron Damien" <[email-masked]>
Date: Wed, 6 Sep 2000 12:12:01 +0200

> using 'FvwmCommand StartNetscapeOnTheCurrentPage' shell command.

This method does not go with the 2.2.4 or in any case I obtain the message
"sh: vp.x: syntax error in expression (remainder of expression is ".x")" in
.xsession-error

I obtain this message in .xsession-error when I clic on the button which
launches the function StartNetscapeOnTheCurrentPage and the window does not
appear as I would like it.

 In fact I will like that the method goes for all the applications. But if
it should be defined a function as you propose it I shoed it only for the
applications as Netscape which spend time so that their window appears.

A friend had said to me to have seen on the Net how to configure fvwm2 to do
what I want but he does not remember it more.

If you have an idea thank you to prevent me. Thank you for your assistance.

Damien SAUVERON

---

From: Mikhael Goikhman <[email-masked]>
Date: Thu, 7 Sep 2000 00:07:14 +0200

> This method does not go with the 2.2.4 or in any case I obtain the message

As I said, this only can work with 2.3.19+ versions.
I see no way how it may be possible in 2.2.4, even FvwmM4 does not suply
coordinates of the current page on the desk.

> applications as Netscape which spend time so that their window appears.

It was a working idea only, you can extend it. For example it is possible
to create StartOnTheCurrentPage function, which gets 1, 2 or more
parameters like command and pattern (in quotes) and uses "$0", "$1".

A clean solution is to restore Style StaysAnywhere after waiting for an
application to be mapped (Wait pattern). This may be tricky.

BTW, maybe I should not tell how something is possible in the developement
fvwm versions, just answer, not possible in 2.2.4? What do others think?

Regards,
Mikhael.