Subject: Re: FVWM: Clicking on taskbar icons to minimize windows. How to do it?

From: Mikhael Goikhman <[email-masked]>
Date: Thu, 15 Aug 2002 14:38:40 +0000

On 15 Aug 2002 15:42:55 +0800, Seng Huat Yeoh wrote:
> 
> > On 15 Aug 2002 02:40:39 +0800, Seng Huat Yeoh wrote:
> > >
> > > For instance you have a window opened (deiconified).   The first
> > > click at its taskbar icon iconifies the window.   The second click
> > > deiconifies it.   The cycle resumes again with the third click
> > > iconifying and fourth deiconifying and so on...
> >
> > Ok, then you need this line only:
> >
> > *FvwmTaskBar: Action Click1 Iconify
> 
> Yes,  this was the solution I was hoping for.   But I just realised I left 
> out one thing.   There's one last slight modification I have on my mind.
> 
> *FvwmTaskBar: Action Click1
>   If Window is not topmost layer
>      Bring it up to top
>   else Window is topmost layer
>      Iconify

You still did not specify what to do when it is iconic, but I may guess.
The correct term of what you want is not "window on the topmost layer",
but "window is raised on its own (normal) layer". For 2.4.6+:

  *FvwmTaskBar: Action Click1 IconifyOrFocusAndRaise

  DestroyFunc IconifyOrFocusAndRaise
  AddToFunc   IconifyOrFocusAndRaise
  + 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

In 2.5.x it may be done without tricks (the syntax may be changed):

  DestroyFunc IconifyOrFocusAndRaise
  AddToFunc   IconifyOrFocusAndRaise
  + I ThisWindow (Iconic) Iconify off
  + I Cond (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 [email-masked].
To report problems, send mail to [email-masked].

---

From: Gregg Dameron <[email-masked]>
Date: Fri, 16 Aug 2002 13:27:50 -0600

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

Does "Raised" mean the window is not iconified _and_ has focus _and_ is not
partially or fully obscured by other windows?  The man page ("Current" command)
is silent about this condition.

Gregg Dameron

---

From: Mikhael Goikhman <[email-masked]>
Date: Fri, 16 Aug 2002 20:14:34 +0000

On 16 Aug 2002 13:27:50 -0600, Gregg Dameron wrote:
> Does "Raised" mean the window is not iconified _and_ has focus _and_ is
> not partially or fully obscured by other windows?

No, Raised only means not obscured by other windows. There may be several
such windows on the desktop. It's irrelative of iconic or focused.

Most of icons (if they are not obscured) would match the Raised condition.
So if there are normal icons (as opposed to NoIcon) a window may be in
2x2x2 = 8 states regarding the Iconic, Raised and Focused conditions. If
NoIcon is used, I think, Raised is always true when Iconic, so there are
6 states.

> The man page ("Current" command) is silent about this condition.

Yup.

Regards,
Mikhael.