Re: FVWM: Alt-Tab and WindowList
On Mon, Feb 15, 2021, at 9:55 AM, Mandar Mitra wrote: > The alternative you suggested won't help me, because I was looking to > address precisely the situation when I have a page "cluttered with many > windows, all atop each other". I'm going to take a low probability shot in the dark. Are you using ClickToFocus, or are you using MouseFocus(default)/FocusFollowsMouse/SloppyFocus? If it is NOT ClickToFocus, are you crossing the "clutter" transitioning the mouse between windows? Each window you cross will briefly have focus, so it will jump to the top of the list and unexpectedly push your "active" windows down. Mark
Re: FVWM: Alt-Tab and WindowList
> Maybe you could try to figure out some reproducable instructions > to make that happen (preferrably with a minimal config). Yes, let me try this. > Have you tried using multiple pages? For example, I use six (2x3) I started with 2x3 and I'm now at 2x4. The clutter usually happens because I have, on one page: a terminal, an Emacs window for writing LaTeX, the output in a pdf viewer, and a bunch of other pdf files that constitute source material for my slides / notes. Thanks for many useful tips. I'm definitely going to include some of these in my .fvwm2rc. > > Idle curiosity: do you use ipe too? Nice to discover such > > commonalities in an unrelated list. > > No, sorry that I fooled you; i just instlled it to see what it's > doing. Wow, thanks for taking so much trouble! Thanks again for your time and all the suggestions. -mandar
Re: FVWM: Alt-Tab and WindowList
Mark Nejedlo wrote (Mon, Feb 15, 2021 at 10:15:41PM -0600): > On Mon, Feb 15, 2021, at 9:55 AM, Mandar Mitra wrote: > > The alternative you suggested won't help me, because I was looking to > > address precisely the situation when I have a page "cluttered with many > > windows, all atop each other". > > I'm going to take a low probability shot in the dark. > > Are you using ClickToFocus, or are you using > MouseFocus(default)/FocusFollowsMouse/SloppyFocus? The only general focus-related setting that I could find in my .fvwm2rc is: Style * MouseFocusClickRaises There are a couple others related to specific programs (e.g., TeamViewer). > If it is NOT ClickToFocus, are you crossing the "clutter" > transitioning the mouse between windows? Each window you cross will > briefly have focus, so it will jump to the top of the list and > unexpectedly push your "active" windows down. I understand this was Dominik's suggestion too, but I'm reasonably sure that is not the case. On this particular laptop with only a 1366x768 screen, I have most windows (esp. pdf viewers) maximised in "cluttered" mode. Many thanks to all of you for your suggestions, -mandar.
Re: FVWM: Alt-Tab and WindowList
On Mon, Feb 15, 2021 at 09:25:44PM +0530, Mandar Mitra wrote: > Dominik Vogt wrote (Sun, Feb 14, 2021 at 12:05:26PM +0100): > I have no idea what I'm doing wrong, but something does seem to > be messing with window focus. For a while, the list is nicely > maintained in MRU order, then suddenly, a window that I haven't > focused for a while jumps up to the middle of the list. The focus order is implemented as a doubly linked list. Windows can not just "jump" around in the list. The list only ever modified in two places in the code: 1) When a window gets focus it's pulled from it's current position and put at the beginning of the list. 2) When a new window is opend, it starts at the end of the list. So, if windows appear at the top of the list which you do not expect, watch closely for reasons why unexpected windows get focus, even for a short while. (For example with MouseFocus if you move the pointer across small visible pieces of other windows.) > Sometimes > its Emacs, sometimes its zathura (a pdf viewer). I copy pasted the > destroyfunc and addtofunc that you provided above into > FvwmConsole, but neither FvwmConsole itself, nor .xsession-errors > had anything to report while the list was being re-ordered, > apparently randomly. Maybe you could try to figure out some reproducable instructions to make that happen (preferrably with a minimal config). It's of course not impossible that there might be a bug in the code, that is highly unlikely, because the focus order is on of the most used pieces of code in fvwm, and if there were list inconsistencies, fvwm would have crashed 20 years ago. > The alternative you suggested won't help me, because I was > looking to address precisely the situation when I have a page > "cluttered with many windows, all atop each other". I bet this has something to do with your problem. -- Have you tried using multiple pages? For example, I use six (2x3) pages. Each has a keyboard shortcut assigned to it. Shells and editors are on page (0 0), browsers are on (1 0), text processors + xpdf are on page (0 1) and so on. This makes it really easy to find windows and keeps the desktop usable. -- #// paging (like on the console) Key F1 A M GotoPage 0 0 Key F2 A M GotoPage 1 0 Key F3 A M GotoPage 2 0 Key 1 A M GotoPage 0 1 Key 2 A M GotoPage 1 1 Key 3 A M GotoPage 2 1 # Menu to move windows around # (inconsistent with abouce bindongs; menus cannot use function keys) Key p TSIWF CM Menu PutOnPageMenu AddToMenu PutOnPageMenu + "Put on page" Title + "&1: page (0 0)" MoveToPage 0 0 + "&2: page (1 0)" MoveToPage 1 0 + "&3: page (2 0)" MoveToPage 2 0 + ": page (0 1)" MoveToPage 0 1 + ": page (1 1)" MoveToPage 1 1 + ": page (2 1)" MoveToPage 2 1 # Start programs on specific pages Style Gnumeric StartsOnPage 1 1, SkipMapping Style Firefox* StartsOnPage 0 1, SkipMapping, MaxWindowSize 99 97 Style Firefox* fixedpposition Style Firefox* NoTransientPPosition, NoFuncHint Style Emacs StartsOnPage 0 0, SkipMapping -- > For now, I've just disabled SelectOnRelease, and use the Fvwm > assigned number to quickly jump to the window I want. This saves > me from having to keep typing Tab to get where I want in the list. > I suppose it'll just take a little while for muscle memory to > reset itself to this usage pattern. Why not simply assign letters to your programs? E.g. -- Key tab A M Menu GotoWindowMenu AddToMenu GotoWindowMenu + "Go to window" Title + "" Prev (emacs) RaiseAndWarp + "" Prev (ipe) RaiseAndWarp + "" Prev (zathura) RaiseAndWarp ... -- Much more intuitive than numbers that change all the time. > Idle curiosity: do you use ipe too? Nice to discover such > commonalities in an unrelated list. No, sorry that I fooled you; i just instlled it to see what it's doing. Ciao Dominik ^_^ ^_^ -- Dominik Vogt
Re: FVWM: Alt-Tab and WindowList
Dominik Vogt wrote (Sun, Feb 14, 2021 at 12:05:26PM +0100): > 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. I have no idea what I'm doing wrong, but something does seem to be messing with window focus. For a while, the list is nicely maintained in MRU order, then suddenly, a window that I haven't focused for a while jumps up to the middle of the list. Sometimes its Emacs, sometimes its zathura (a pdf viewer). I copy pasted the destroyfunc and addtofunc that you provided above into FvwmConsole, but neither FvwmConsole itself, nor .xsession-errors had anything to report while the list was being re-ordered, apparently randomly. The alternative you suggested won't help me, because I was looking to address precisely the situation when I have a page "cluttered with many windows, all atop each other". For now, I've just disabled SelectOnRelease, and use the Fvwm assigned number to quickly jump to the window I want. This saves me from having to keep typing Tab to get where I want in the list. I suppose it'll just take a little while for muscle memory to reset itself to this usage pattern. Thanks for all your suggestions! Idle curiosity: do you use ipe too? Nice to discover such commonalities in an unrelated list. -mandar
Re: FVWM: Alt-Tab and WindowList
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 UpA 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- 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