On 13 Sep 2005 12:58:49 -0400, Richard Ellis wrote: > > 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
(You added this last line, but "Iconify off" already includes "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 Note that with fvwm-2.5.x, this function is reduced to: DestroyFunc FuncFvwmIconifyOrFocusAndRaise AddToFunc FuncFvwmIconifyOrFocusAndRaise + I ThisWindow (Iconic) Iconify off + I TestRc (NoMatch) ThisWindow (Raised) Iconify on + I ThisWindow (!Iconic) Focus + I ThisWindow (!Iconic) Raise This also demonstrates a technique to implement real if-else in 2.4.x. > 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. Unfortuntely, Raised condition is only meaningful when all windows are in the same layer. In 2.5.11, a new condition Overlapped is added that only checks that a window is not on top among windows of its layer. I will change "Raised" here to "!Overlapped" in fvwm-themes. There is no easy way to do it in fvwm-2.4.x. You may use the following hack, store the id of the last windows being "Raise"-d in file and reset it on any other operation of this function. Use PipeRead that prints "+ I Iconify on" when the same window is going to be raised for the second time. But then this function will become _really_ complex. Better upgrade to 2.5.x. Regards, Mikhael.
