Re: FVWM: Transparency/Translucency revisited...

From: Tavis Ormandy <taviso_at_sdf.lonestar.org>
Date: Tue, 26 Aug 2003 13:31:19 +0000

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

-- 
-------------------------------------
taviso_at_sdf.lonestar.org | 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 majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Tue Aug 26 2003 - 08:33:31 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:55 BST