Subject: FVWM: FvwmButtons patch

From: [email-masked]
Date: Wed, 14 Feb 1996 08:12:48 +0100 (MET)

Umm, is it morning yet? Seems I've been sitting up all night patching up this
silly little program. At least something is still working, tho.
Actually I have some fixes and some features. I don't know if anybody other
than me have ever noticed those bugs, but if you have tried to make a compact
buttonbar with lots of pixmaps and no text you should have. Oh well, why do
I bother; here's the list of actual patches:

-------------------------------------------------------------------------------

Bugfixes:
 * Seems the code was deliberately designed to only allow window sizes 1x1 
   pixel too small to contain the buttons. Either that or there is some server
   dependancy that has to be sorted out. Anyway, it's fixed now. If it turns
   out it's for the worse for you, scream.

 * Buttonheight was calculated as the highest pixmap + fontheight, without 
   checking if the highest pixmap actually had a title. This is now fixed.

New Features:
 * To effectively avoid any titles, you can now set the font to "none", i.e.

     *FvwmButtonsFont None

 * The padding between the interior and the 3D frame used to be hardcoded to
   2 pixels horizontally and 3 vertically. This can now be adjusted with

     *FvwmButtonsPadding PadX [PadY]

   If PadY is not given, it is assumed equal to PadX.

-------------------------------------------------------------------------------

That is what I've done. If anyone wants it mail me and I'll send the whole
source (FvwmButtons.c and icons.c), I don't know how to make a patchfile, and
I'm to tired to try to learn how at the moment. Also there are some other
things I want to do with it. First of all, I know there is another patch for
this thingie, it's mentioned in the TO-DO, but where can I find it? Is it
buried somewhere in the Mb's of the backlogs of this list? Or even better,
is there someone "in charge" I can send my changes to?

I set up a further to-do list for FvwmButtons, reads as follows:

-------------------------------------------------------------------------------

TO DO:
 * Update the man page.

 * There seems to be some minor inaccuracies in the centering of swallowed
   windows that won't scale freely. After rescaling a few times the window
   typically end up in the northwest corner of its button. Minor bug.

 * For those using buttons to activate menus, it should be possible to define
   that this should happen on pushdown, not release. Will investigate.

 * Dynamically allocate structs for buttons, get away with all the usually
   wasted preallocated stuff, and also the MAX_BUTTONS constant.

 * Include old patch for multiple button combinations (?) Just found this in
   the general TO-DO list for fvwm. I'll look at it.

 * Another one from the TO-DO list, could be a difficult one, but here goes:
   Fix FvwmButtons inability to handle child program deaths.

 * And another one, must confess I didn't really understand this one:
   Add ability to FvwmButtons to swallow existing window, and to unswallow
   windows as well.

 * Maybe allow the same pixmap/text combination as in the menus?

(From here on I get kind of visionary :-) Must be lack of oxygen or maybe the
25 hrs w/o sleep...)

 * Make option for automaticly reducing colormap when loading xpm's. 

 * Make module loadable as "Module FvwmButtons MyPanel", and it will assume
   the latter name.

 * Clean out all the parser code, make it moduleindependant and put it in
   a separate file for use by other modules.

 * There really should be some interactive way to build the buttonbar :-)

-------------------------------------------------------------------------------

Bottom line: This patch makes the buttonbar potentially more compact (if you
want it to be), though the window is 1 by 1 pixel larger in the standard
configuration. 

Vyrdsamt,
-Jarl

--
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]
Date: Wed, 14 Feb 1996 18:08:04 +0100 (MET)

After some good hours of sleep I am back. Did some testing on the patched
FvwmButtons module, and came up with a few stupid bugs: 
1) First of all, a couple of "[i]"'s in the patch were mistyped as "[1]"'s,
   resulting in complete failure to correctly calculate buttonheight in most
   cases. 
2) The vertical padding was originally 4 pixels, not 3 as I thought. Or rather,
   it was both 3 and 4, but it turns out it was 4 where it counted :-)
   Just change the two ypad=3 with ypad=4.

Chuck:
> not the bottom, which for me is still only 1 pixel thick.  Pixmaps
> without fonts ("-" for title) are now drawn differently, of course,
> but sometimes better and sometimes not.
Mmm, please tell me how they are when they're for the worse? Could be a result
of bug 1 above, of course.

> list).  I was going to include it into FvwmButtons, but haven't had
> the time yet, obviously.  So, since you are playing around in there,
Obviously you had, 'cause it's in there :-) At least in 2.0.38 ->

Vyrdsamt,
-Jarl