cycle through all the windows on the current page

There are this and this threads dealing with the issue. On these threads they are using raise and focus. I have been able to cycle through all windows with this code:

[code]DestroyFunc F_FocusRaise
AddToFunc F_FocusRaise

  • I Focus
    #+ I Raise
  • I WarpToWindow 50 50

Move to previuos/next window that do not have resize handles

Key Left A 4 Prev (AcceptsFocus,HasHandles,CurrentPage,AnyScreen) F_FocusRaise
Key Right A 4 Next (AcceptsFocus,HasHandles,CurrentPage,AnyScreen) F_FocusRaise[/code]

With Raise in the FocusRaise function, I was not able to cycle through the windows in reverse order (I tried both Focus and FlipFocus). It works after commenting out Raise.

Nevertheless, I am not sure if I understand things correctly. I would very much appreciate clarification on these basic questions:

1.- WindowList and staking order: are they referring to the same? Saying that “FlipFocus changes the order of the WindowList” is the same that saying “FlipFocus changes the stacking order of the Windows”?
2.- Rasing a window, does it has any effect on the stacking order of the windows?
3.- I assume prev and next move through the windows ring (=staking order). For example, if I have these windows (A-F) ordered, and I am (raise + focus) on the window A:
1 2 3 4 5 6
A B C D E F

If I FlipFocus/Raise window B, would I have this?
1 2 3 4 5 6
B A C D E F

And, if I FlipFocus/Raise window E, would I have this?
1 2 3 4 5 6
E A B C D F

If I am on A (raise+focus), is the previous windows B? And next window F?
1 2 3 4 5 6
A B C D E F

I hope this is not too basic for this forum. If I have understood correctly, the answer to all questions should be “yes”. In case I am totally lost, is there any documentation I should read?

Thanks a lot!

No. They are not the same thing. The order of the window list is determined to be either the order the windows were created in (if you’ve set the style !FPSortWindowlistByFocus) or the time the window last had focus. If you’re using SloppyFocus or ClickToFocus, !FPSortWindowlistByFocus is the default. So instead, the windows aren’t automatically sorted by focus, instead we look at the time the window was created.

Of course, this can be affected by the use of FlipFocus which always reorders the window ring (what you’re referring to the “order of the WIndowList”).

The stacking order refers to where the window is in the given layer – whether it has been raised or layered. I’ve spoke about this in a separate thread – go look for it here on the forums.

Yes.

Yes

Maybe – assuming you never did the first step to FlipFocus window B.

No. If window A is the one with the current window context at the time you call “Next”, then window B is the one that is looked at, and window F is the one in the previous position.

– Thomas Adam

Thomas,

Thanks very very much for the answers! They have been really helpful!

Cheers!