On Sat, Feb 13, 2021 at 08:37:12PM +0530, Mandar Mitra wrote: > I have Alt-Tab bound as follows: > > Key Tab A M WindowList (CurrentPage) > CurrentAtEnd,IconifiedAtEnd,...,SelectOnRelease Alt_L > > I'd like windows to be listed in most recently used order, and > there are a number of fvwm related Web pages that state that is > what "normally" happens, but what I'm observing is the following. > > As long as I'm switching back and forth between Window A and > Window B, things work well. I also have some other windows (all > pdf viewers displaying different files) on the same page. If I > take a look at one of them, I would expect A, B and the focused > pdf viewer window to occupy the top 3 slots, but that's not what > happens. Either A or B is positioned way down in the list.
Try running just WindowList (currentpage) from FvwmConsole and see if that works as expected. The ordering of that list entirely depends on the order in which windows are focused. If that results in a weird ordering, then something messes with window focus. In that case, try if this helps: destroyfunc EWMHActivateWindowFunc addtofunc EWMHActivateWindowFunc + I echo Ignoring EWMHActivateWindowFunc $[w.id] $[w.name] And watch the console output for the debug messages. -- However, I recommend to ditch Alt-Tab and the windowlist command completely. It's just unintuitive, failed design: You always need to be aware of the order in which windows have had focus. Instead I use Key Left A M DirectionOrThis West Key Right A M DirectionOrThis East Key Up A M DirectionOrThis North Key Down A M DirectionOrThis South Key Home A M DirectionOrThis FromPointer Center Key Minus A M DirectionOrThis Center I.e., pressing Alt-<Cursor> selects the next window in the given direction from the currently focused window. Sometimes it requires a couple of key presses to get the right window, but you get immediate visual feedback, and it's very easy to use. You don't have to keep track of some "hidden" state. The selection algorithms prefers closer windows of windows that are farther away, and windows in the exact direction over windows that are a couple of degrees off. Play with it to get a feeling for it. It works pretty well if the current page is not cluttered with many windows, all atop each other. Alt-Minus gives you the window closest to the current one, and Alt-Home the one that's closest to the pointer. Both bindings help with stacked windows, but I hardly ever use them. Ciao Dominik ^_^ ^_^ -- Dominik Vogt