On Sun, May 27, 2012 at 2:05 PM, Walter Alejandro Iglesias <e...@roquesor.com> wrote: > On Sun, May 27, 2012 at 01:19:15PM -0500, Jonathan Kotta wrote: >> On Sun, May 27, 2012 at 10:31 AM, Walter Alejandro Iglesias >> <e...@roquesor.com> wrote: >> > Hello, >> > >> > I use ClickToFocus and just IconMan, I don't use icons. >> > >> > When I iconify a window I expect the last focused window >> > recovers the focus. It happens just randomly. >> > >> > I use the default Iconify function. I've tried adding custom >> > functions (following what I've found in some posts in the Fvwm >> > forum about similar issues) without success. Perhaps I don't >> > understand well what Fvwm saves for Prev and Next windows; is this >> > managed by FvwmWindowList function? >> > >> > Thanks in advance. >> > >> > Walter >> > >> > >> > >> > >> >> I also use ClickToFocus, and use FvwmEvent to switch focus when >> iconifying. It works well for me. >> >> ,---- >> | DestroyFunc FocusPrev >> | AddToFunc FocusPrev >> | + I None (CurrentPage, Focused, AnyScreen) \ >> | Prev (CurrentPage, !Iconic, !Shaded, Visible, AcceptsFocus, AnyScreen) >> \ >> | Focus NoWarp >> | >> | DestroyModuleConfig FvwmEventFocus: * >> | *FvwmEventFocus: Cmd Function >> | *FvwmEventFocus: new_page FocusPrev >> | *FvwmEventFocus: new_desk FocusPrev >> | *FvwmEventFocus: destroy_window FocusPrev >> | *FvwmEventFocus: iconify FocusPrev >> | >> | KillModule FvwmEvent FvwmEventFocus >> | FvwmEvent FvwmEventFocus >> `---- >> >> -- >> Thanks, >> >> Jonathan Kotta >> >> Hofstadter's Law: >> It always takes longer than you expect, even >> when you take into account Hofstadter's Law. > > > Hy Jonathan > > Should I add this function to a custom version of Iconify? >
Sounds like you got it working, but I'll follow up anyway. You don't need to define your own version of Iconify. With the snippet I posted, FvwmEvent runs FocusPrev every time a window is iconified (and also whenever a window is destroyed, or the page or desk is changed). -- Thanks, Jonathan Kotta Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.