On 18 Aug 2003 08:34:23 +0200, Uwe Pross wrote:
>
> Last weekend I stucked a little bit writing a function for
> the taskbar which switches to a window if it is not visible
> (or not on the current page) and which iconifies the window
> if it is on top on the current page (e.g. fully visible).
>
> I tried:
>
> DestroyFunc TaskBarButton1
> AddToFunc TaskBarButton1 I ThisWindow (!Visible) Function DeiconifyUnshadeFlipFocus
> + I ThisWindow (Visible) Iconify on
>
> DestroyFunc DeiconifyUnshadeFlipFocus
> AddToFunc DeiconifyUnshadeFlipFocus I Iconify off
> + I WindowShade off
> + I FlipFocus
> + I Raise
>
> Assigning TaskBarButton1 to the taskbar button and pressing
> it brings up the window iconifies it immediately.
>
> I thought I might use UserStates to make it work but this
> seemed to much for this simple requierment.
>
> Any hints? Thanks in advance.
>From fvwm-themes:
*FvwmIconMan: action Mouse 1 A sendcommand FuncFvwmIconifyOrFocusAndRaise
DestroyFunc FuncFvwmIconifyOrFocusAndRaise
AddToFunc FuncFvwmIconifyOrFocusAndRaise
+ I DestroyFunc RealIconifyOrFocusAndRaise
+ I AddToFunc RealIconifyOrFocusAndRaise
+ I ThisWindow ( Iconic) + I Iconify off
+ I ThisWindow ( Iconic) + I Focus
+ I ThisWindow (!Iconic Raised) + I Iconify on
+ I ThisWindow (!Iconic !Raised) + I Focus
+ I ThisWindow (!Iconic !Raised) + I Raise
+ I RealIconifyOrFocusAndRaise
This works for 2.4; in 2.5 there is a real if-else syntax, so it would be
shorter:
DestroyFunc FuncFvwmIconifyOrFocusAndRaise
AddToFunc FuncFvwmIconifyOrFocusAndRaise
+ I ThisWindow (Iconic) Iconify off
+ I TestRc (NoMatch) ThisWindow (Raised) Iconify on
+ I ThisWindow (!Iconic) Focus
+ I ThisWindow (!Iconic) Raise
Regards,
Mikhael.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Mon Aug 18 2003 - 03:35:24 BST