Subject: Re: FVWM: FvwmButtons: shade and wait for application to be launched

From: Mikhael Goikhman <[email-masked]>
Date: Mon, 1 Jul 2002 10:44:29 +0000

On 01 Jul 2002 01:07:21 +0200, Sergio Nasi wrote:
> 
> I can live without the double click feature, but I cannot exactly figure
> out what you mean by saying that FvwmButtons stay pressed while the
> application is waiting to load.
> 
> I have a couple of FvwmButtons bars on my desktop and all the buttons
> within them are associated with application icons (background is transparent
> so that icons appear to be lined up directly on desktop): for example I
> have xterm, gvim, konqueror, opera (and so forth) pixmaps grouped within a
> vertical FvwmButtons bar I use to launch the corresponding applications.
> 
> I cannot see any change in those icons when I start each application.

Send your full FvwmButtons configuration if you can't figure it out.
You should use a non-zero Frame value for this feature to be visible.

> Does the FvwmButtons feature you were referring to apply to buttons with
> application icons?

Any button with (Action `Exec "app_pattern" your_app with arguments`)
or (Swallow "app_pattern" your_app with arguments) stays pressed until
a window matching "app_pattern" appears.

> Do I need to provide a "pressed down" version of those icons?

No. Currently only relief is changed from "raised" to "sunken". It would
be nice to have an option to shift an Action button foreground (icon,
text) in +2+2 pixels when pressed. Something like "PressedOffset 2 2".
Maybe I will add this later when I have a time. Any other volunteer?

Regards,
Mikhael.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
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: Sergio Nasi <[email-masked]>
Date: Tue, 2 Jul 2002 00:28:53 +0200

Ok folks,
got it: I used the suggested syntax for FvwmButtons, dropped the
transparent background and now buttons stay pressed until applications have
started.
...but I'd like to have the best of both worlds (=transparent back +
changing icons) :)))

So, since you're seeking for volunteers Mikhael, I can try to hack the fvwm
code to get what you're suggesting (got not so much spare time, though)

This list is strictly not for developers, but could you try to direct me on
the right path?

I have a good programming experience and knowing what C units in
FvwmButtons needs to be touched could be enough.

I'll take this occasion to thank this list for being so responsive to
requests for help and to celebrate this terrific window manager that at
first, many years ago, frightened me but have conquered me back since only
a few months with its amazing flexibility.

Thank you so much.
Greetings from Italy

Sergio

On Mon, Jul 01, 2002 at 10:44:29AM +0000, Mikhael Goikhman wrote:
> It would

---

From: Mikhael Goikhman <[email-masked]>
Date: Mon, 1 Jul 2002 23:06:51 +0000

On 02 Jul 2002 00:28:53 +0200, Sergio Nasi wrote:
> So, since you're seeking for volunteers Mikhael, I can try to hack the
> fvwm code to get what you're suggesting (got not so much spare time,
> though)
> 
> This list is strictly not for developers, but could you try to direct me
> on the right path?

I suggest to take a look at how "Padding x y" option is implemented and
implement "PressedOffset x y" (or however you will call it) similarly.
Searching for "Padding" in FvwmButtons/*.[ch] should be a good start.

You may parse option args using GetIntegerArguments from libs/Parse.c.
I suggest to make the second integer optional, it may be set to the
first one if omitted, negative values supported, 0 is the current default.
If you need more help, don't hesitate to ask on [email-masked].

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 2 Jul 2002 01:27:40 +0200

> If you need more help, don't hesitate to ask on [email-masked].

Wait a moment.  It *is* possible to change the icon while waiting
for the application already, at least in the latest development
code.  We recently hacked something into FvwmButtons that allows
to change the text and icons in a running FvwmButtons.  It's a bit
difficult to configure, but it works well.  So, you can bind a
function to the button that changes the icon, waits for the app
and restores the old icon:

  *FvwmButtons: (Icon foo.xpm, Action Function start_foo_func)

  AddToFunc start_foo_func
  + I SendToModule FvwmButtons Icon <button-spec> foobar.xpm
  + I Exec exec foo
  + I Wait foo
  + I SendToModule FvwmButtons Icon <button-spec> foo.xpm

<button-spec> describes which button is changed.  It can either be
a column/row pair ("+1+3").  Or a button number (only buttons with
icons count, top left button is #0).

(config untested).

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
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: Mikhael Goikhman <[email-masked]>
Date: Tue, 2 Jul 2002 09:48:41 +0000

> icons count, top left button is #0).

The "SendToModule FvwmButtons" syntax above will be changed (enhanced).
I didn't suggest this solution, because it is not generic.

This code does not do what PressedOffset is expected to, it changes an
icon of _one_ specific button _after_ it was activated (i.e. mouse button
released). PressedOffset works when the mouse button is _pressed_ and
until it is released or a window appears (if hangon used). PressedOffset
works when normally Frame is changed from "raised" to "sunken" and also
without a frame (Frame is 0). This functionality is absent and can't be
currently simulated.

Also, if you have 10 buttons that start applications, you should draw
additional 10 icons (not everyone is an artist) and add a lot of code.
Instead of just adding one line: *FvwmButtons: PressedOffset 2 -3".

Another improvement may be to add PressedIcon option (this icon would be
used instead of Icon when a button is pressed). But for users without
additional icons or for users with Frame 0, PressedOffset should be enough.

Regards,
Mikhael.