[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fvwm
Subject:    Re: Finally solved: FVWM: Events when windows close?
From:       Thomas Adam <thomas () xteddy ! org>
Date:       2010-08-13 11:42:39
Message-ID: 20100813114237.GD3027 () abacus ! soton ! smoothwall ! net
[Download RAW message or body]

On Fri, Aug 13, 2010 at 01:31:36PM +0200, Michael Großer wrote:
> Then, I handle the dirty details.
> > # 1. if a window is already focussed, then do nothing

Current implies focused, of course, but:

DestroyFunc focus_a_window
AddToFunc   focus_a_window
+ I Current (Focused) Break

> > # 2. if no window was focussed, then focus a window under the mouse

AddToFunc focus_a_window I PointerWindow (!Focused) Focus

... which has the benefit of working OK with ClickToFocus as well.

> > # 3. if no window was under the mouse, then focus a visible window

AddToFunc focus_a_window 
+ I TestRc (NoMatch) Next (AcceptsFocus, Visible, CurrentPage) Focus

> > # 4. if a window was not visible (because the just now disappeared
> > #    window hid it), then try again to focus it

AddToFunc focus_a_window
+ I TestRc (NoMatch) Next (AcceptsFocus, CurrentPage) Focus

> If this kind of knowledge transfer is welcome, please
> let it me know.

For the FvwmWiki, yes.

Go forth, and contribute to it.  You'd be the first.

-- Thomas Adam

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic