[SOLVED]Gameterm needs restart to properly set transparency.

I think this is the right place where to post this question.
Here is my config (taken from Stonecrast Green V2):

[code]# User-configurable vars are in the below file
Read fvwm2rc.variables

#######################################

Starting and Exiting

#######################################

AddToFunc StartFunction

Sets the wallpaper:

  • I Test (Init) Exec exec python -c “import glob, random, os ; os.system(‘Esetroot -scale %s’ %random.choice(glob.glob(’$[FVWM_USERDIR]/images/wallpapers/*.jpg’)))”

    Sets the Dock

  • I Module FvwmButtons FvwmDock

    Allows Alt-Ctrl-1, e.g., to uniconify the first iconified app

  • I Module FvwmEvent

    Starts “game terminal”

  • I Test (Init) StartTerminal

    Removes the file that stores iconified apps’ window IDs (used for keybindings)

  • I Test (Init) Exec exec rm -f $[FVWM_USERDIR]/.icons

DestroyFunc StartTerminal
AddToFunc StartTerminal

  • I Exec exec $[TermName] -name gameterm -tint grey -bc -vb -b 2 -w 2 +sb -tr -sh 30 -cr yellow -fg LightGrey -sl 1000 -fn $[TermFont] -fb $[TermFont] $*
  • I Wait gameterm

    The following refer to the horizontal/vertical percent of screen:

  • I All (gameterm) Resize 100 45
  • I All (gameterm) Move 2p 0p
  • I All (gameterm) WindowShade[/code]

First start gives the bottom of the image on the (urxvt) gameterm. If I restart fvwm the urxvt sets the right transparency.
It seems that when starting, it just take a shot of the background.
Where is the bug code?

Second questin, if I restart fvwm with the gameterm closed I get only a rectangular area, without the terminal. This happened both with xterm and urxvt.

Thank you for your help,
Yakko78

That certainly isn’t your entire .fvwm2rc file – use a pastebin for it please. If you have multiple files, upload them somewhere.

– Thomas Adam

You are right. I thought it was enough.
I uploaded everything, except scripts and images dirs, on http://www.mascanc.net/~vieri/fvwm/ .
I placed two images and so you can see the differences.

I took a look at quake term too. FvwmButton Shading and transparency Topic.
I found your solution:

Style *   WindowShadeSteps 0, WindowShadeScrolls

but it doesn’t work for me. I use fvwm 2.5.23 patched.

Thank you! :slight_smile:

Well, remember that urxvt is responsible for setting the transparency for itself – i suspect what’s happening here is that it’s happening at the wrong time almost. In your StartFunction, try setting a delay as in:

+ I Test (Init) Schedule 8000 StartTerminal

Does that help any?

– Thomas Adam

Thanks for the quick reply.
It doesn’t work as it creates an artifact when opening another program.
By the way I thought the same.
Right now I changed a little bit the code, using Xdefaults:

[code]urxvt.background: black
urxvt.foreground: white
urxvt.scrollBar: false
urxvt.tintColor: white
urxvt.fading: 80
urxvt.fadeColor: black
urxvt.shading: 15
urxvt.inheritPixmap: true
urxvt.pointerColor: black
urxvt.pointerColor2: white

gameterm.background: black
gameterm.foreground: white
gameterm.scrollBar: false
gameterm.tintColor: white
gameterm.fading: 80
gameterm.fadeColor: black
gameterm.shading: 15
gameterm.inheritPixmap: true
gameterm.pointerColor: black
gameterm.pointerColor2: white[/code]

and config

[code]…
DestroyFunc StartTerminal
AddToFunc StartTerminal

Use .Xdefaults to define transparency

  • I Exec exec $[TermName] -name gameterm -geometry 213x25+0+0
  • I Wait gameterm
  • I All (gameterm) WindowShade
    …[/code]

Solving a little bug using 1280 sized desktop and the Resize variable.
Really, I don’t know why I need to set that geometry, but it’s not the issue of this thread.

So, I think it starts earlier, too. But it capture the botton of the image. Why? It seems that the funcion read the end of the image and then it goes up.

At this point, this has nothing to do with FVWM at all.

– Thomas Adam

Nope! :smiley:
I copied the func in fvwm2rc.terminal:

[code]# This shades/unshades a terminal at the top of the screen by pressing the F1 key.

Style gameterm NoTitle, Sticky, WindowListSkip, CirculateSkipIcon, CirculateSkip,
Style gameterm StaysOnTop, NoHandles, BorderWidth 0, WindowShadeSteps 75

DestroyFunc gameterm
AddToFunc gameterm

  • I Exec exec $[TermName] -name gameterm -geometry 213x25+0+0
  • I Wait gameterm
    [/code]

Now it works correctly, but it appears only once and doesn’t shade!
The matter is that I don’t know how to set the shade/unshade function. As I enable the Focus option it gives me the same transparence problem.
Right now I’m taking a deeper look at the the shade func.

No. Really! You’re only mitigating the symptoms not solving them. You’re chasing red herrings. Good luck with that.

Again, nothing to do with FVWM.

– Thomas Adam

I’m not agree with you. You where right using the Schedule function.
Now I know why:

+ I All (gameterm) WindowShade

This was the real guilty. :smiley:

So adding:

+ I All (gameterm) Schedule 8000 WindowShade

solved every problem.
Next, I fond why urxvt needs such a strange width. :smiley:

Thank you very much for your help. :slight_smile:

You’re missing the point – what I asked you to do is simply mitigating the problem; cheating, if you will. It’s not a solution by any means.

– Thomas Adam

:slight_smile: Yes, this is true. :slight_smile:
By the way, thank you for the cheat. :smiley: