Subject: Re: FVWM: different mouse clicks on fvwmbuttons buttons

From: [email-masked]
Date: Wed, 1 Jan 1997 14:41:09 -0500 (EST)

On  1 Jan, Markus Gutschke wrote:
> Joey Hess <[email-masked]> writes:
>> I want to make a fvwmbuttons button that will do 3 differnet actions
>> depending on which mouse button is used to click on it. Is that possible?
> 
> If you want the button to do anything fancy, then the easiest solution
> is writing a small X application that gets swallowed in the
> fvwmbuttons bar.

For this case, the easiest is probably to use the builtin capabilities
of FvwmButtons.  From the FvwmButtons manpage:

         Action [(options)] command
              Specifies an fvwm command to be executed  when  the
              button  is  activated by pressing return or a mouse
              button. If command contains whitespace it  must  be
              quoted. The current options are:

              Mouse  n  -  this action is only executed for mouse
              button n.  One actions  can  be  defined  for  each
              mouse button, in addition to the general action.

So, it's as easy as:

*FvwmButtons(Title "Foo", Icon foo.xpm, \
             Action(Mouse 1) "xmessage Button 1 was clicked.", \
             Action(Mouse 2) "xmessage Button 2 was clicked.", \
             Action(Mouse 3) "xmessage Button 3 was clicked.")

--Xris

-- 
Can anyone remember when the times were not hard, and money not scarce?

Chris "Xris" Laas, Global Dictator in the making.
When I have attained my glorious destiny, I will have my own domain.
Until then, you can reach me at [email-masked].

--
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].