Subject: Re: FVWM: Restoring focus after FPGrabFocus

From: [email-masked]
Date: Tue, 11 Mar 2003 23:08:17 +0100

On Sat, Feb 01, 2003 at 10:23:36PM -0500, Tessa Lau wrote:
> 
> I use FPGrabFocus to force a particular app to grab the keyboard focus
> after it's launched.  When the app exits or is iconfied, FVWM 2.5.5
> doesn't restore the focus to the app underneath the cursor (usually an
> xterm) until I physically move the cursor out of the window and back
> into it.  I'm trying to reduce my dependence on the mouse.  How can I
> work around this behavior?

You need to set the FPReleaseFocus style too:

> Here are the relevant lines from my fvwmrc:
> 
> 	Style "*" MouseFocusClickRaises
> 	Style TLtodo   FPGrabFocus

  Style TLtodo FPGrabFocus, FPReleaseFocus

> 	DestroyFunc popup-todo
> 	AddToFunc popup-todo
> 	+ "I" Next ("TLtodo") Warp-and-Raise
> 	+ "I" None ("TLtodo") Exec /home/tlau/bin/todo.py

> 	+ "I" Wait TLtodo

Ugh, that line isn't such a good idea.  Assuming the function was
called when there already was a TLtodo window on the desk.  The
"Wait" the waits forever for a new one to appear and fvwm remains
in the wait loop, working with reduced functionality.  You want

 + I None (TLtodo) Wait TLtodo

instead.

> 	Key t     A    SC   popup-todo

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
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].