Re: FVWM: Focus Change

From: Uwe Pross <keinFruehstuecksfleisch_at_gmx.net>
Date: Tue, 2 Sep 2003 16:25:43 +0200

Hi there,

On 02 Sep 2003 at 09:45:31 +0200, Uwe Pross wrote:

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

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

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

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

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 majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Tue Sep 02 2003 - 09:27:32 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:55 BST