1

Algorithm: If there is no window currently on top, then make the next new xterm stay on top (layer 6).

I got that to work:

Module FvwmEvent

AddToFunc MyUpdate
+ I WindowStyle StaysOnTop

AddToFunc MyUpdateIfXterm
+ I Current ("XTerm") MyUpdate

AddToFunc MyUpdateIfLayer6Empty
+ I None (Layer 6) MyUpdateIfXterm

*FvwmEvent: Cmd
*FvwmEvent: add_window MyUpdateIfLayer6Empty

Style * ClickToFocus

Now, I want that xterm on top also to be without title, and so I change the fourth line to:

+ I WindowStyle StaysOnTop, NoTitle

This, however, stops xterm from going to top. It looks like StaysOnTop stopped working.

Did I run into a bug? If so, is there a workaround?

Version:

$ fvwm --version
fvwm 2.6.5 compiled on May 15 2014 at 22:08:55
with support for: ReadLine, Stroke, XPM, PNG, SVG, Shape, XShm, SM, Bidi text, Xinerama, XRender, XCursor, XFT, NLS
feklee
  • 533
  • 4
  • 15

1 Answers1

0

Inserting UpdateStyles right after moving the window to top does the trick:

AddToFunc MyUpdate
+ I WindowStyle StaysOnTop
+ I UpdateStyles
+ I WindowStyle NoTitle

From documentation:

Delayed Execution of Commands

Note: There are many commands that affect look and feel of specific, some or all windows, like Style, Mouse, Colorset, TitleStyle and many others. For performance reasons such changes are not applied immediately but only when fvwm is idle, i.e. no user interaction or module input is pending. Specifically, new Style options that are set in a function are not applied until after the function has completed. This can sometimes lead to unwanted effects.

To force that all pending changes are applied immediately, use the UpdateStyles, Refresh or RefreshWindow commands.

feklee
  • 533
  • 4
  • 15