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