How can I prevent iconified window from getting focus

Especially when there are uniconified windows on the currentpage?

To be more specific, suppose I have 3 uniconified window A, B and C.

Click on A, B, and C so they are focused in that order.

Next, iconify B, and then C. What happens now is the icon of B get the focus not the uniconified window A.

BTW, I am using the Thumbnail effect which might be relevant to this question.

So the question is: when are these icons gaining focus, and how?

What is it you would rather happen, and when?

– Thomas Adam

Sorry, let me try to explain in more detail.

The icon of B (thumbnail of the window B) get focus when C is iconified. I can notice this because the border of the icon B get highlighted. I guess that this happens because B has focus just before C and therefore when C is iconified, the focus goes back to B, even when it is now iconified.

What I want is to give focus to window A which is not iconified at that time. It does not make sense to give focus to an iconified window B.

And this mythical thumbnail function you’re using? (Not that it’s probably got anything to do with it, but you’ve mentioned it, so… where is it?)

– Thomas Adam

DestroyFunc Thumbnail
AddToFunc Thumbnail
+ I PipeRead "echo $[w.id]=$[w.iconfile] >> $[FVWM_USERDIR]/.thumbnail"
+ I Raise
+ I ThisWindow (!Shaded, Iconifiable, !Iconic) PipeRead "$[fvwm_scripts]/thumb $[w.id] $[fvwm_thumbnail_size] $[fvwm_tmp]/icon.tmp.$[w.id].png $[w.iconfile]"
+ I Iconify

where thumb prints “WindowStyle IconOverride, Icon …”

Right, so tac on to the end of that function:

# This is special to you since I dread to think....
+ I Next (CirculateHit, AcceptsFocus, !Iconic, CurrentPage) FlipFocus

Customize to suit your needs.

– Thomas Adam