Subject: FVWM: FvwmButtons

From: [email-masked] (Jim Bianchi)
Date: 30 Jun 1998 03:28:01 GMT

Is there a way, using FvwmButtons, to 'pass through' a mouseclick on
a swallowed window, such that another (hidden) app is started? I'm thinking
of, say, xload -- which is a commonly swallowed program in many buttonbars.
When you click on it, it might start top. Or swallow one of the clock pgms
(xclock, rclock, etc), and a click on that might start a program that would
pop up a calendar, or an appointment book, or start a saytime pgm. I use
xeyes as a swallowed pgm. It strikes me this'd be a neat thing to click on
to start a screen lock (as opposed to popping up the utilities menu and
moving to the screen lock section). Of course, this would only work on a
swallowed window, but it seems to me this'd be a Neat Thing, if it were
possible. It'd be even better if there was a way to map button one, button
two, and button three (with or without modifiers) to do different things. 

	I'm fairly sure Afterstep (barf) has this facility in its Wharf, and
the aclock pgm (which is very neat) will allow a keyclick on it to invoke an
otherwise hidden pgm, as does asmodem. Of course, these instances are
inherent in those pgms. 

-- 
[email-masked] 
Eclectic Garbanzo BBS, (707) 539-1279
--
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] (David S. Goldberg)
Date: 30 Jun 1998 10:34:51 -0400

I assume you're using fvwm2.  Currently, if you swallow an app, all
mouse clicks get passed to the app on the assumption that's what you
want.  This sucks for apps that don't do anything with mouse clicks
but that's the way it is.  A while back I tried to come up with an
option that would override this.  It seemed simple enough at first,
but I'm not an X programmer and I ran into a couple brick walls and
punted with a workaround because I didn't have enough time to put into
it.

My workaround is to provide the swallowed app with a miniscule blank
title area (I think that frame padding works too, but I don't remember
for sure).  If you click in the title/frame, the mouse is intercepted
by FvwmButtons and the Action configuration is honored.  If you click
in the app, the app gets the click.

Here's an example of how I use this.  I swallow xmeter (an xload like
program that monitors various stuff in addition to load).  I define
the title to be whitespace with nil2 as the font so I get a title area
that's about 2 or 3 pixels high.  If I click on that, I get the action
depending on which button is clicked (an xterm running top, or
raising/lowering the buttonbar.)  If I click in the xmeter, I get it's
usual mouse response.

*FvwmButtons(10x8, Frame 1, Action `Exec "top" TOP`, \
    Action (Mouse 2) "Next [FvwmButtons CirculateHit] Raise", \
    Action (Mouse 3) "Next [FvwmButtons CirculateHit] Lower", \
    Swallow(NoClose,UseOld) XMeter "Exec XMETER", \
    Font nil2, Title " ")

For xmeter, this is pretty good, if not ideal; I get a fully
functional xmeter plus the extras I want for that button.  I also do
this for xclock, which is not so great since xclock doesn't do
anything with the mouse clicks.

--
Dave Goldberg
Post: The Mitre Corporation\MS B305\202 Burlington Rd.\Bedford, MA 01730
Phone: 781-271-3887
Email: [email-masked]