FVWM: Re: FvwmButtons

From: David S. Goldberg <dsg_at_mitre.org>
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: dsg_at_mitre.org
--
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 majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Tue Jun 30 1998 - 09:36:42 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:38:01 BST