Re: FVWM: Focus after Iconify

2012-05-29 Thread Walter Alejandro Iglesias
On Tue, May 29, 2012 at 12:23:57PM -0500, Jonathan Kotta wrote:
 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.


Hi, Jonathan

I'd tried adding your function and activating FvwmEvent module
but the issue was still there.  More late I released that neither
what I said in my last post had fixed it.

What finally worked was a little change I did in the function I use
for mouse actions on IconMan.  Time ago I read this post:

http://www.fvwmforums.org/phpBB3/viewtopic.php?f=33t=1933

and after trying some changes I got the function I was using till now:

DestroyFunc IconManClicked
AddToFunc IconManClicked
+ I ThisWindow (Iconic) Iconify
+ I TestRc (Match) Break
+ I ThisWindow (Focused) Iconify
+ I TestRc (Match) Break
+ I ThisWindow (!Focused) Focus
+ I TestRc (!Match) Break
+ I ThisWindow Raise

But for some reason, randomly selecting windows by clicking on the
iconman several times at some point altered the focus order.  Now
I've changed it for this:

DestroyFunc IconManClicked
AddToFunc IconManClicked
+ I ThisWindow (Iconic) Iconify
+ I TestRc (Match) Break
+ I ThisWindow (Focused) Iconify
+ I TestRc (Match) Break
+ I ThisWindow (!Focused) FlipFocus
+ I TestRc (!Match) Break
+ I ThisWindow Raise

and problem solved.  It was replacing Focus for FlipFocus the
magic touch.


Salu2

Walter





Re: FVWM: Focus after Iconify

2012-05-28 Thread Walter Alejandro Iglesias
I've found my error.  I used:

DestroyFunc FuncIconifyAndFocusPrev
AddToFunc FuncIconifyAndFocusPrev
+ I Prev (AcceptsFocus, CurrentPage, !Iconic) Focus
+ I Prev (AcceptsFocus, CurrentPage, !Iconic) Raise
+ I Iconify on

for the title iconify button.  But for some reason (I don't
remember why I included this option) I had this:

Style * CirculateSkip, CirculateSkipIcon

in my general style options, that's why the above didn't work.
After removing it, all works like expected.

Thanks

Walter


PD: If you include my address in Carbon Copy I receive your
message twice.




Re: FVWM: Focus after Iconify

2012-05-27 Thread Jonathan Kotta
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: iconifyFocusPrev
|
| 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.



Re: FVWM: Focus after Iconify

2012-05-27 Thread Walter Alejandro Iglesias
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: iconifyFocusPrev
 |
 | 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?






Re: FVWM: Focus after Iconify

2012-05-27 Thread Thomas Adam
On 27 May 2012 19:19, Jonathan Kotta jpko...@gmail.com wrote:
 | KillModule FvwmEvent FvwmEventFocus
 | FvwmEvent FvwmEventFocus

Rather:

AddToFunc StartFunction I Module FvwmEvent FvwmEventFocus

-- Thomas Adam