Re: cwm(1) without warping the pointer
Aric Gregson <[email protected]> Sat, 4 Jul 2026 11:28:17 -0700
| Newsgroups | gmane.os.openbsd.misc |
|---|---|
| Message-ID | <[email protected]> |
On 2026-07-04 13:49, Walter Alejandro Iglesias wrote: >On Sat, Jul 04, 2026 at 08:49:02AM +0200, NilsOla Nilsson wrote: >> The "focus previous" is a very good improvement. If you >> open a shell for a fast check and the closes it f.ex. >> >> [...] >> >> not always. Focus is never preserved which often, at >> least for me, means that I start writing in another >> window than what i meant to. >> >> This seems to be Aric's problem as well. >> > >Let's see if what I'm about to explain helps everyone to organize >ideas. > >In cwm the default behavior is to give focus to the window where the >pointer lands. The cases where this doesn't happen is because, for >convenience, it's avoided through some hack. One of these hacks is >making the pointer jump (warp), for example when we 'create' a window; >otherwise, the new window wouldn't gain focus. Another example is when >you change focus from one window to another without using your mouse (or >from your keyboard with pointer-move.) > >If, like me, you prefer the keyboard, any time you want to go back to >(or alternate with) the window you were previously working on, you >depend on the cycle stack (don't confuse this with "layers", cwm does >not support layers.) In cwm the function to do this is window-cycle (I >bind it to Ctrl-Tab, as in most modern window managers.) The dynamic of >this feature is negatively affected by mouse focus: every time you move >the pointer, whether intentionally or accidentally, any visible window >under its trajectory is loaded in the cycle stack. In the so-called >"strict" mouse focus you'll find in many window managers, this also >happens when you close or un-maximize a window. Then, when you cycle >back with the intention to focus and raise the window you were working >on, you first have to pass throw all those ones that accidentally won >the focus. As if this were not enough, if when closing the active >window the pointer lands on the root window, an extra unwanted step is >added to the cycle. Yes, it is also annoying to accidentally hit the mouse while cycling windows! I thought it was just me. It is great to see interest in making cwm even better than it already is. Aric