On Mon, Aug 25, 2003 at 09:00:32PM +0200, Dawid Kuroczko wrote:
> Hello. :-)
> 
> It should work like this:
>  1. user clicks thus calling a Menu.
>  2. current screen dump is taken (with all the windows, but
>     without a menu just as yet).
>  3. this screen dump is made available to Menu as
>     root background pixmap.
>  4. Menu is displayed with tinted real background.
> 
> This way it's pretty easy to make an illusion of real
> transparency (and looks "l33t", as some may say).
> 

nice idea, i havnt seen it before so i got a kde using friend to show
it to me.

> My question is, how to do it to, and make it good.  I came up
> with a function which would call xwd, convert and fvwm-root
> and then call Menu.  Which is slow (convert) and does set
> background instead of just making it "virtually" available
> to Menu...

i would implement a wrapper to the Popup command, TransMenuPopup for
example, ive been playing around and its definitiely possible (its a
little laggy if you want to tint it, like i have below, but the effect
is nice)

I'm not sure if theres anyway of getting the geometry of a menu before
its drawn, so ive just grabbed a menu size chunk here (edit to fit your
menus)

# Usage: TransMenuPopup [MenuName]
DestroyFunc TransMenuPopup
AddToFunc TransMenuPopup
+ I PipeRead "echo SetEnv tr_menu_face /tmp/fvwm_$${RANDOM}.xpm"
+ I PipeRead "import -window root -crop \
                140x300+`expr $[pointer.x] - 70`+`expr $[pointer.y] - 7` \
                -dither -silent $[tr_menu_face] \
        && convert -modulate 50 $[tr_menu_face] $[tr_menu_face] \
                && echo Nop \
        || echo Beep"
+ I CopyMenuStyle * TransMenuStyle
+ I MenuStyle TransMenuStyle MenuFace TiledPixmap $[tr_menu_face], \
        Foreground White
+ I ChangeMenuStyle TransMenuStyle $0
+ I Menu $0
+ I ChangeMenuStyle * $0
+ I DestroyMenuStyle TransMenuStyle
+ I Exec exec rm -f -- $[tr_menu_face]

# Right-Click on root window to test...
Mouse 1 R A TransMenuPopup MenuFvwmRoot

Heres a screenshot of my usual MenuFvwmRoot...
http://taviso.decsystem.org/images/normal.png

And heres one after replacing Popup with TransMenuPopup example...
http://taviso.decsystem.org/images/funky.png

-- 
-------------------------------------
[EMAIL PROTECTED] | finger me for my gpg key.
-------------------------------------------------------
--
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 PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to