Subject: FVWM: on the use of 'Current'

From: Wesley Hart <[email-masked]>
Date: Mon, 22 Dec 1997 16:06:23 -0600

I seem to be having trouble getting the 'Current' built-in to do
what I think it ought to do.  Can anyone help clear up my confusion?

I'm attempting to create a function 'PopupAppMenu' which will pop up
a certain menu based on what window it is invoked from.  My function 
looks like:

DestroyFunc PopupAppMenu
AddtoFunc   PopupAppMenu \
  "I" Current [app1] Popup App1Menu
+ "I" Current [app2] Popup App2Menu
+ "I" Current [app3] Popup App3Menu

and is bound into the titlebar of all aplicable windows, i.e.:

Style "*"    NoButton 5
Style "app1" Button5
Style "app2" Button5
Style "app3" Button5

Mouse 0		5	A	Function PopupAppMenu

The various App?Menu definitions exist are are correct (I can pop them up
by binding them directly to a key or mouse button).

Now, the way I understand it, the appropriate App?Menu should be popped 
up when button 5 is pressed in the respective window.  But when put to the
test, nothing happens (the button relief reverses to indicate that it's been
pressed, but no popup appears).  So can anyone tell me: is fvwm doing the
wrong thing, or am I assuming the wrong thing?  I've glanced at the code for
CurrentFunc() and Circulate(), but am none the wiser.  Any suggestions
on how to accomplish this would be most appreciated.

This is with fvwm 2.0.46 running on HP-UX 10.01.

-- 
Wesley Hart
		Two things are infinite:  the universe and human 
		stupidity; and I'm not sure about the the universe. 
					-- Albert Einstein
--
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] (A.J.vanWerven)
Date: Tue, 23 Dec 1997 09:17:40 +0100 (MET)

> + "I" Current [app3] Popup App3Menu

Seems correct to me.

> Style "app3" Button5

Perhaps you should put a space between Button and 5.
It's the only possible error I can think of.

What does fvwm say when you try this ?
You get an error message ?
Do you keep a .fvwm2.log file ?

CIAO di Al Grandi.

-- 
God is real, unless declared integer.

A. van Werven
Dept. of Computer Science, Leiden University, The Netherlands
Phone: +31 6 54212683
E-mail: [email-masked]
URL: http://www.wi.leidenuniv.nl/~avwerven

---

From: Wesley Hart <[email-masked]>
Date: Tue, 23 Dec 1997 10:48:11 -0600

> It's the only possible error I can think of.

I've tried it with and without the space.  The button got mapped
either way, but I didn't get my popup when it was pressed.

> Do you keep a .fvwm2.log file ?

I hadn't been keeping a log file, but on your advice I now do.
The only suspicious thing that showed up were some ButtonStyle
errors on an unrelated button.  When I cleared up those, Current
started behaving as I expected (!).  I'm still not sure I understand
what was causing the odd behavior, but I've got my popups working the
way I want them and I guess that's good enough for me.  Thanks for
your help!

-- 
Wesley Hart
		"Optimism -- The belief that everything will work out
		 well (Irrational; bordering on insane)."
					-- The Armageddon Factor
--
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].