Greg Badros <gjb_at_cs.washington.edu> writes:
> I spent the weekend rewriting the menu code for fvwm-2.0.45 to better
> support the keyboard (improving on my earlier patch). In the process I
> added several other useful features. The description of the patch
> appears below. The actual patch is available at:
> <A HREF="
> http://www.cs.washington.edu/homes/gjb/patches/fvwm-2.0.45-menus-animation-gj
> b.patch
> "> patch </A>
>
> To apply the patch, do something like
>
> cd fvwm-2.0.45
> patch -p1 <fvwm-2.0.45-menus-animation-gjb.patch
>
> Look for *.rej files, then rebuild. The description and patch are also
> available on my web page under "Newer stuff." I tested the changes and
> applying the patch on a slackware-like Linux 2.0.29. The patch should
> apply cleanly to an unmodified 2.0.45 tree.
>
> Please cc: comments to me. I read the fvwm-workers list regularly, but
> I don't subscribe to the fvwm list currently.
I tried this patch.
I used Solaris 2.4 on a Sun.
> Greg J. Badros
> gjb_at_cs.washington.edu
> Seattle, WA USA
> http://www.cs.washington.edu/homes/gjb
>
>
> DESCRIPTION:
> ------------
> This patch includes lots:
>
> Added new commands:
>
> AnimatedMove -- works like move
>
> SetAnimation -- customizes how the animated moves (and menu movement) looks
>
> SetMenuDelay -- change how long to delay before popping up a submenu
> when resting on a menu item (ala the famous win OS's menus)
>
> SetEnv -- Allow setting of environment which processes started
> by fvwm2 will inherit. This uses "putenv" system call.
>
> Changed commands:
>
> Move -- added greater flexibility so you can give destination
> positions as stuff like "w+5p" to mean current window position + 5
> pixels or "-2" to mean its right edge should be 2% of the screen height
> > from the bottom [works for horizonal, too, of course]. See new man page
>
> MenuStyle -- added "animated" qualifier, along with type "win" to
> emulate more closely the famous win OS's menus look and feel
>
> AddToMenu -- Menus titles take side-pixmaps between "_at_" (at) characters an
> d
> side-pixmap background colors between "^" (caret) characters.
> Also,
> substrings denoting regular pixmaps (between "%" characters) ar
> e removed
> even if that pixmap cannot be located; thus your menu still loo
> ks ok. A
> warning is printed to stderr, instead.
>
>
> Almost complete rewrite of menus code:
> --------------------------------------
> These new menus support the keyboard much better than before. See the
> improved man page. They also can animate out of your way when at the
> right edge of the screen. Use animated menustyle and try it-- it's
> easier to watch than explain. Also now supported is a delay before
> popping up child menus when you rest on a menu item.
Keyboarding worked great. Animation was neat.
The default animation backup and then move forward effect didn't seem
to add anything for me, but I was using a slow machine (Sparc 1+). I
didn't experiment with other animation values.
I was torn between the reverse imaging effect from the "win" menus and
the 3d appearance from the "mwm" menus. I'm not sure how it would
look but too bad I couldn't use both 3d appearance and the stronger
feedback from reverse imaging the current selection.
By creating menu styles of "fvwm", "mwm" and "win", we sort of create
packages of effects. If you want "auto-popup", you can get it with
mwm or win. If you want 3d you can get it with fvwm or mwm. It might
be nice to just specify the effects wanted.
I was able to fool the animation logic that tries to put the mouse
pointer back where it started by moving the pointer out of the left
side of a menu. I had to go out of my way to do this, and don't see
how anyone could be disturbed by this.
> Note that the animation and the menu delay require the "usleep"
> (micro-second sleep) system call. If you don't have it, "select" can
> probably be contorted to do the right thing. See the man page for
> "select" for your OS.
I had linking problems with usleep. I read that if I use Solaris 2.5,
usleep would have been OK. I changed the code to use select, and I
read that I could have used poll. I guess that using usleep is OK.
> Internal Changes
> ----------------
> I reindent some places where the indentation was not uniform and
> confusing. I also changed a lot of #define-s to enum-s. Menu code is
> *way* better now (though certainly could get even better-- in
> particular, I didn't do anything specific to facilitate sticky menus).
>
> Uses gperf to build "fvwm-command-hasher.c" which gets included by
> functions.c. Reworked functions.c to use a hash lookup on a built-in's
> name instead of linear lookup. Reduced my startup time by 15% or so.
> You may need to give -DNO_GPERF if you have problems with this.
>
> BUGS?
> -----
> Sure, there's gotta be plenty. Email me at gjb_at_cs.washington.edu and let
> me know. In particular, send me a minimal startup file and descriptions
> of what to do to see the problem. Also send me your configure.h, I
> suppose and tell me what platform you're working on.
I think this is a great package of changes. I don't see why it
shouldn't be incorporated into a future release.
> USE AT YOUR OWN RISK! I am not responsible for the use of, the misuse
> of, or anything to do with this patch.
> --
--
Dan Espen Phone: (908) 699-5570
dane_at_bae.bellcore.com
444 Hoes Lane Room RRC 1C-214
Piscataway, NJ 08854
--
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 Fri Apr 25 1997 - 08:24:52 BST