fvwm version 2.4.19

I have been trying for a bit today to find a way to convince the
FvwmTaskBar buttons to emulate the WinXP task bar buttons as closely
as possible for my wife's computer.  Eventually I found the following
definition (slightly modified) from the fvwm themes package (0.6.2):

DestroyFunc FuncFvwmIconifyOrFocusAndRaise
AddToFunc   FuncFvwmIconifyOrFocusAndRaise
+ I DestroyFunc RealIconifyOrFocusAndRaise
+ I AddToFunc   RealIconifyOrFocusAndRaise
+ I ThisWindow ( Iconic)         + I Iconify off
+ I ThisWindow ( Iconic)         + I Raise
+ I ThisWindow ( Iconic)         + I Focus

+ I ThisWindow (!Iconic  Raised) + I Iconify on

+ I ThisWindow (!Iconic !Raised) + I Raise
+ I ThisWindow (!Iconic !Raised) + I Focus

+ I RealIconifyOrFocusAndRaise


This function, when I assign it to "click1" for FvwmTaskBar does
almost everything I want.  If the window is iconic, it is
deiconified, raised, and focused.  If the window is not iconic, and
not on top of the stacking order, it will be raised and focused. 
Both of these work just fine.

The part that is causing me the last bit of consternation is with the
iconification of a non-iconic raised window (the "+ I ThisWindow
(!Iconic Raised) + I Iconify on" part).  If the window that is being
manipulated is not behind another "StaysOnTop" window, then it too
works just fine.

But, if the window that is being manipulated is covered, even
slightly, by a StaysOnTop window (e.g., the FvwmTaskBar itself, an
FvwmIconMan, an oclock, etc.) then it is never considered to be
"Raised", even when it is at the top of it's current layer.  And so
fvwm continues to "Raise" and "Focus" it instead of making it into an
iconic window.

I tried adding "Layer 4" to the conditions, thinking that it might
restrict the conditions to looking for "Raised" status among only
the layer 4 windows, but that did not work.

I tried adding an iconification and layer 0 0 assignment FvwmTaskBar
at the start of the function, and a deiconification and layer default
assignment of FvwmTaskBar at the very end, but that too did not work
(I'm guessing it's somewhat of a race condition problem for this
one).

Is there any way to have the "Raised" status consider only windows in
the current layer (not all layers) when determining "topmost" status
so that this last little bit of the emulation can be made to work? 
Or can anyone suggest another way to accomplish this last little bit
that works even if the window of interest is actually underneath a
StaysOnTop window?


Reply via email to