Subject: RE: FVWM: FvwmButtons bug (and workaround :-)

From: "Trebor A. Rude" <[email-masked]>
Date: Thu, 29 Aug 96 22:48:36

--- On Fri, 30 Aug 1996 00:22:36 +0200  Guenther Grau <[email-masked]> wrote:

>Thus, whenever you have a copy of the program you want to swallow running, it 
>won't swallow it.

	It's not supposed to.  That's what the "UseOld" option to Swallow is 
for, no?

-------------------------------------
Name: Trebor A. Rude
E-mail: [email-masked]
Date: 8/29/96
Time: 10:48:37 PM
-------------------------------------

--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
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: Guenther Grau <[email-masked]>
Date: Fri, 30 Aug 1996 15:35:52 +0200

>         It's not supposed to.  That's what the "UseOld" option to Swallow is
No, but my wording was a bit unclear. Let me rephrase it:

*FvwmButtons - whatever Swallow "XLoad" Exec xload -nolabel &
*FvwmButtons - whatever Swallow "XClock" Exec xclock&

What happened to me was, it executed and swallowed xload just fine,
executed xclock fine as well, but didn't swallow it. This was just
because I had another copy of xclock running. Thus, whenever you have a
copy of the program you want to swallow running, it won't swallow the
newly executed one, which is a bug (and it doesn't swallow the old one,
which is correct, unless you use "UseOld" option :-).

  Guenther

---

From: [email-masked] (Ross J. Reedstrom)
Date: Fri, 30 Aug 1996 10:49:08 -0500 (CDT)

"Trebor A. Rude said:"
> 	It's not supposed to.  That's what the "UseOld" option to Swallow is 

Trebor - 
My understanding of what Guenther said was that FvwmButtons won't swallow a
_new_ copy of a program that you already have running. Apparently, Guenther
wants two copys of xclock, one on his button bar, one not. This is reasonable,
and the software should allow it.

Ross

----------------
 Ross J. Reedstrom
 [email-masked]                      (608) 265-5591
 School of Pharmacy                               or
 University of Wisconsin-Madison            (608) 265-2599
 425 N. Charter St.
 Madison, WI 53706
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
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: [email-masked] (Albrecht Kadlec)
Date: Fri, 30 Aug 96 18:11:11 +0200

>>>>> Guenther Grau writes:

G> *FvwmButtons - whatever Swallow "XLoad" Exec xload -nolabel &
G> *FvwmButtons - whatever Swallow "XClock" Exec xclock&

G> What happened to me was, it executed and swallowed xload just fine,
G> executed xclock fine as well, but didn't swallow it. This was just
G> because I had another copy of xclock running. Thus, whenever you have a
G> copy of the program you want to swallow running, it won't swallow the
G> newly executed one, which is a bug (and it doesn't swallow the old one,
G> which is correct, unless you use "UseOld" option :-).

any differences with the new style syntax ?
I've had some problems with the compatibility parameters and therefore
switched to the new syntax.

But I suspect a logical problem in the code. (simply a race condition):

Maybe the clock appears too fast, since the code is already in core.
I think, FvwmButtons looks for some sort of window creation event. 
If that one has already passed, it won't find the window.

albrecht
-- 
A engineer, a doctor and a politician were sitting in a dark room
arguing over whose practice was the oldest. The doctor felt he had won
because the first rib was taken out of Adam and given to Eve. This was
a surgical procedure. The Engineer said that Earth was made out of
chaos, therefore making his work the oldest. But then, the politician
asked, "Who do you suppose created the chaos?"
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
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: Guenther Grau <[email-masked]>
Date: Fri, 30 Aug 1996 19:23:21 +0200

> If that one has already passed, it won't find the window.

Hmm, good idea, but I just tested (again, just to be sure I am not
telling nonsense :-) that this is not the case. I just started xclock&
in a shell, then did a restart fvwm2 and the FvwMButtons module comes up
again with the place for the clock reserved, but empty. An xclock comes
up as well. Then I wait until everything has settled down. After that I
execute xclock & in my shell, but it doesn't get swallowed. I guess that
when the option "UseOld" is not present, then it doesn't use old and new
ones :-) If it were a race condition it should swallow the newly created
xclock, which it doesn't.

  Guenther

---

From: Thomas Leitner <[email-masked]>
Date: Fri, 30 Aug 1996 19:39:11 +0200 (MET DST)

-----BEGIN PGP SIGNED MESSAGE-----

Hi,

As a followup to my previous mailing: I just noticed that it is *not* the
properly running fvwm2 process which eats up the CPU time, it's an fvwm2
process left from a previous X session!!

Apparently under some circumstances the fvwm2 process as well as the
FvwmButtons process do not die properly when I log out and the X server
dies. 

I can easily reproduce that: I log in and press the "mail" button in
my FvwmButtons box. A decterm is opened with the mailer and the
mail button stays pressed. Now when I just terminate the session,
by stopping the dxsession manager (which causes the X server to die),
I can see 'fvwm2' and 'FvwmButtons' still running and eating CPU time
when I log-in from a remote terminal.

Anyone knows what I could do about that ?

Thanks everybody -- Tom

- --------------------------------------------------------------------------
T o m   L e i t n e r                       Dept. of Communications
                                            Graz University of Technology, 
e-mail    : [email-masked]      Inffeldgasse 12
Phone     : +43-316-873-7455                A-8010 Graz / Austria / Europe
Fax       : +43-316-463-697
Home page : http://wiis.tu-graz.ac.at/people/tom.html
PGP public key on : ftp://wiis.tu-graz.ac.at/pgp-keys/tom.asc or send 
mail with subject "get Thomas Leitner" to [email-masked]
- --------------------------------------------------------------------------

---

From: Guenther Grau <[email-masked]>
Date: Sat, 31 Aug 1996 00:16:20 +0200

Ross J. Reedstrom wrote:
[...]
> and the software should allow it.

Thank you for clearifying (sp?) this. While I didn't intent to run to copies of the
xclock, I just happend to run an xclock while I was modifying my .fvwm2rc and
experienced, that the swallow command wouldn't work as expected. After finding this
bug (btw. it exsists on SunOS, X11R6 also, just installed and tested it :-), I think
that it _is_ reasonable to have two copies of a program running, one in the button
bar, and one not, although I don't intend to. What's more important, though, is that
new users probably won't spend hours to find the cause why swallow doesn't work as
expected, as I did.

  Guenther