Subject: FVWM: Focus Change

From: Uwe Pross <[email-masked]>
Date: Tue, 2 Sep 2003 09:45:31 +0200

Hi together,

I stuck again :-\ The following code is intended to remember
which  window  had  focus  for  page. So when I come back to
certain page the window which had focus on that page at last
should get focus:

DestroyFunc CurrentPageFocusFunc
AddToFunc CurrentPageFocusFunc I Next ("CurrentPage" "State 2") Focus
+ I None ("CurrentPage" "Focused") Prev ("CurrentPage" "!Iconified" "!Fvwm*B*") Focus

DestroyFunc MarkWindowAsActiveFunc
AddToFunc MarkWindowAsActiveFunc I Current ("!Iconified") All ("CurrentPage" "!Focused") State 2 False
+ I Current ("!Iconified") State 2 True

DestroyModuleConfig FvwmEvent*
*FvwmEvent: Cmd Function
*FvwmEvent: new_page CurrentPageFocusFunc 
*FvwmEvent: new_desk CurrentPageFocusFunc
*FvwmEvent: destroy_window CurrentPageFocusFunc
*FvwmEvent: focus_change MarkWindowAsActiveFunc

The "State 2" condition seems to be completely ignored. 

Thanks for any hints.

Cheers, Uwe
-- 
  ,_,   For personal reply/mail put "fvwm"
 (O,O)  in the subject.
 (   )  Otherwise I won't receive our mail.
--"-"----------------------------------------
--
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: Uwe Pross <[email-masked]>
Date: Tue, 2 Sep 2003 16:25:43 +0200

Hi there,

> The "State 2" condition seems to be completely ignored. 

Removing the quotes from the State condition helped on my
box. This might be a minor bug.
The following code produces the desired behaviour:

DestroyFunc CurrentPageFocusFunc
AddToFunc CurrentPageFocusFunc I Next (CurrentPage State 2) Focus
+ I None (CurrentPage Focused) Prev (CurrentPage !Iconified !Sticky) Focus

DestroyFunc MarkWindowAsActiveFunc
AddToFunc MarkWindowAsActiveFunc I Current (!Iconified) All (CurrentPage !Focused) State 2 False
+ I Current (!Iconified) State 2 True

The last focused window gets focus when reentering a
page. Even if the mouse pointer is over another window. 

Cheers, Uwe

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 2 Sep 2003 16:47:51 +0200

> box. This might be a minor bug.

You are overusing quotes.  There is no "State 2" condition.  The
"2" is the argument of the "State" condition.  It's not necessary
to quote any of the conditions unless a token contains whitespace
or characters that have to be protected from expansion.  The
"right" way to specify conditions is to separate them with commas
and not use quotes.

> AddToFunc CurrentPageFocusFunc I Next (CurrentPage, State 2) Focus
                                                   ^^^

> + I None (CurrentPage Focused) Prev (CurrentPage, !Iconified, !Sticky) Focus
                                                 ^^^         ^^^
...

Ciao

Dominik ^_^  ^_^

---

From: Uwe Pross <[email-masked]>
Date: Tue, 2 Sep 2003 16:57:28 +0200

Hi there,

>From the man page:

	  ...  The conditions are a list of keywords from
          the list below and are separated by commas or
          whitespace. ...

	  Conditions include "AcceptsFocus",
          "!AcceptsFocus", "Focused", "!Focused",
          "HasPointer", "!HasPointer", "Iconic", "!Iconic",
          "Visible", "!Visible", "Raised", "!Raised", 
	  ... ,"State  n"

A example in the manpage would be IMHO quite helpful. 

Thanks anyway.

Cheers, Uwe

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 2 Sep 2003 17:07:22 +0200

>           "Visible", "!Visible", "Raised", "!Raised", 

This is a formatting bug in the man page that has already been
corrected in 2.5.x.  We should have used a different font, not put
the keywords in double quotes.

Ciao

Dominik ^_^  ^_^