On Thu, Sep 13, 2001 at 07:02:09PM +0200, Johannes Zellner wrote:
> Hi,
>
> I tried
>
> Style "*" SloppyFocus, GrabFocus
>
> DestroyFunc Fred
> AddToFunc Fred
> + I WindowId "$w" Maximize false
> + I WindowId "$w" FlipFocus
>
> Key Next A C Current (CurrentPage) Fred
>
>
> The "Maximize false" might result in the focus beeing on
> another window, as I've SloppyFocus. The second line of
> the function should bring the focus back to the original
> window, but that doesn't work apparently.
All lines of the function are executed before the focus transition
caused by the "maximize false" is handled. The "flipfocus" part
*does* actually work, but its immediately undone. To make this
work, the FlipFocus command has to be delayed until after all
events have been handled. The easiest way I could find is to
use FvwmCommand:
DestroyFunc Fred
AddToFunc Fred
+ I WindowId "$w" Maximize false
+ I Exec FvwmCommand "WindowId $w FlipFocus"
This starts an FvwmCommand process in parallel to fvwm. Usually,
fvwm handles its events faster than FvwmCommand can deliver the
FlipFocus command (although this may fail if the connection to the
server is slow) since starting a new process and sending the
commands to the FvwmCommandS daemon is involved.
Make sure you start the FvwmCommandS module in your StartFunction
and that you have FvwmCommand in the PATH.
Bye
Dominik ^_^ ^_^
--
Dominik Vogt, dominik.vogt_at_gmx.de
Reply-To: dominik.vogt_at_gmx.de
--
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 Thu Sep 13 2001 - 17:21:20 BST