On Sun, Sep 19, 2004 at 09:01:11PM +0300, Mikko Heiskanen wrote:
> Hi,
> is it possible to have focus move to nearest window, after closing
> a window? I tried the following:
> 
> *FvwmEvent-NewWindow: StartDelay 4
> *FvwmEvent-NewWindow: add_window FuncFocusWindow
> *FvwmEvent-OldWindow: Cmd
> *FvwmEvent-OldWindow: PassId
> *FvwmEvent-OldWindow: destroy_window FuncFocusWindow
> DestroyFunc FuncFocusWindow
> AddToFunc FuncFocusWindow
>       + I ThisWindow ("My Window") Move 200p 100p
>       + I Focus
>       + I WarpToWindow 50p 50p
> AddToFunc StartFunction I FvwmEvent FvwmEvent-NewWindow
> FvwmEvent-OldWindow
> 
> I think the Oldwindow FocusFunc focuses the window being closed.
> Now, I couldn't find a way to achieve what I want.
> I started to use fvwm with no mouse, and now I need to either
> focus with mouse or alt-tab after closing a window.
> I am using 2.5.10.

Try this:

  *FvwmEvent-FocusNext: Cmd
  *FvwmEvent-FocusNext: destroy_window FuncClosestWindow
  
  DestroyFunc FuncClosestWindow
  AddToFunc FuncClosestWindow
  + I Direction C FocusAndWarp
  
  DestroyFunc FocusAndWarp
  AddToFunc FocusAndWarp
  + I Focus
  + I WarpToWindow 50p 50p

However, this gives focus to the window closest to the pointer
even if a window is closed that does not have the focus.

Ciao

Dominik ^_^  ^_^

 --
Dominik Vogt, [EMAIL PROTECTED]

Attachment: pgpuwchcuXtVm.pgp
Description: PGP signature

Reply via email to