Subject: FVWM: Taskbar-Function

From: Uwe Pross <[email-masked]>
Date: Mon, 18 Aug 2003 08:34:23 +0200

Hi together,

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.

Regards, Uwe
--
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 [email-masked].
To report problems, send mail to [email-masked].

---

From: Mikhael Goikhman <[email-masked]>
Date: Mon, 18 Aug 2003 11:33:37 +0300

>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.

---

From: Uwe Pross <[email-masked]>
Date: Mon, 18 Aug 2003 11:07:24 +0200

Hi there,

>   + I ThisWindow (!Iconic) Raise

Quite tricky ;-) Using "Cond" instead of "TestRc" on 2.5.7
works as I hoped.

Thank you.

Regards Uwe