I wrote a very simple function to keep some of my windows in the top layer:
# Function: ToggleAlwaysOnTop # # Toggle always on top. DestroyFunc ToggleStaysOnTop AddToFunc ToggleStaysOnTop + I ThisWindow (Layer 6) WindowStyle StaysPut + I ThisWindow (Layer 4) WindowStyle StaysOnTop + I UpdateStyles + I Raise
This function seems to do the job. The problem is that I also have a button decoration on my windows, which depends on whether the window is on the top layer. This decoration is defined as:
+ AddButtonStyle 6 (Vector 4 50x25@1 75x75@0 25x75@0 50x25@1) + ButtonStyle 6 - MwmDecorLayer 6
When I trigger
ToggleStaysOnTop by clicking this button, the decoration correctly changes shape, but when I call the function from a keyboard binding the decoration does not change. It changes correctly only when I unfocus the window, or do any other action that may modify the other styles of the window, like making it sticky.
From this I concluded that there must be a function to update the decorations from within my
ToggleStaysOnTop function, but I could not find anything. Is there any such function? If not, is there any other method that would allow me to achieve this?
Thank you in advance.
fvwm3 1.0.2 (released)
with support for: PNG, Shape, XShm, SM, XRandR, XRender, XFT, NLS