new equivalent of StaysOnTop?

Hi,

I have spent a while trying to get to grips with the documentation before sending this query, so if I have missed something “obvious” then please forgive me, it is not for lack of trying.

I am using FVWM 2.6.6, and would like to do something equivalent to the following in older versions:

Style xclock StaysOnTop

but the docs suggest that this option has been removed and replaced with layers, so it seems that I would somehow instead need to tell it that xclock should be in layer 6. Unfortunately I can’t see the syntax to do this. I see that there is some discussion of how to set up a function to move windows between layers, but I simply want it to always be on top. Please can someone give me a working example.

Thanks.

What you want is the command Layer. You find it in Window Movement and Placement.

To put xclock in layer 6 this should work:

Style xclock Layer 0 6

I’m using in Fvwm-Nightshade this function to toggle between default (initial layer of the application) and layer 6:

[code]DestroyFunc FuncStaysOnTopAndBack
AddToFunc FuncStaysOnTopAndBack

  • I ThisWindow (Layer 2) Pick (CirculateHit) Layer 0 6
  • I TestRc (!Match) Pick (CirculateHit) Layer default
  • I Raise[/code]
    Hope that helps.

– Thomas –

Thank you. I had already tried Layer but didn’t realise that it takes two arguments. “Layer 0 6” did not seem to work (it seems to put it in layer 0 according to FvwmIdent), but “Layer 6 6” seems to have worked.

A little confusingly, the change was only applied to new windows - doing “Restart fvwm2” after editing .fvwm2rc was not sufficient to change the layer of an existing window. Not a problem now that I know about it, but it made it harder to debug before I realised that this was the case.