Re: cwm(1), when closing a window, pass focus to prev in stack

Walter Alejandro Iglesias <[email protected]>
Newsgroups gmane.os.openbsd.tech
Message-ID <[email protected]>
On Mon, Jun 22, 2026 at 07:57:02AM +0000, Job Snijders wrote:
> On Mon, Jun 22, 2026 at 09:49:42AM +0200, Walter Alejandro Iglesias wrote:
> > This is a ping of a proposal I made last year.
> > 
> > Current behaviour: when you close a window, whatever other window the
> > pointer lands on gets the focus.
> > 
> > Behavior proposed: when you close a window, the pointer warps (passing
> > the focus) to the previous window in the stack.  Conveniently, raise it
> > first, otherwise if it's behind another window the latter will get the
> > focus instead.
> > 
> > The downside of this change is that when closing a window using the
> > mouse, by clicking on a dialog "Close" button or "Quit" in the
> > application menu, the pointer will jump while you're manually
> > controlling the mouse, what can be confusing.  Personally I find this
> > less undesirable than randomly giving input to any client each time I
> > close a window, as happens with the current behavior (which in some
> > cases could lead to dangerous mistakes).
> 
> This seems fine to me, in the sense that it perhaps makes
> opening/closing a bit more symmetric.
> 

One annoyance of mouse focus is to loose the focus when un-maximizing.
cwm solves this by dragging the pointer (client_ptr_inbound()), keeping
it on the active window when moving, resizing or un-maximizing.  The bug
I mention here (second paragraph):

  https://marc.info/?l=openbsd-tech&m=178203533768497&w=2

is a side effect of this feature.


-- 
Walter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.