cwm(1) avoid losing focus when changing xterm font size

Walter Alejandro Iglesias <[email protected]>
Newsgroups gmane.os.openbsd.tech
Message-ID <[email protected]>
cwm(1) drags the pointer keeping it inside the window when it's resized.
This does not happen when xterm is resized using its internal font
resizing mechanism (~/.Xdefaults):

  *VT100*translations: #override \n\
        Ctrl <Key> minus:smaller-vt-font() \n\
        Ctrl <Key> plus:larger-vt-font() \n\


Index: xevents.c
===================================================================
RCS file: /cvs/xenocara/app/cwm/xevents.c,v
diff -u -p -u -p -r1.151 xevents.c
--- xevents.c	5 Jan 2026 14:46:59 -0000	1.151
+++ xevents.c	26 Jun 2026 11:37:34 -0000
@@ -168,6 +168,9 @@ xev_handle_configurerequest(XEvent *ee)
 
 		XConfigureWindow(X_Dpy, cc->win, e->value_mask, &wc);
 		client_config(cc);
+
+                if (cc == client_current(sc))
+                        client_ptr_inbound(cc, 1);
 	} else {
 		/* let it do what it wants, it'll be ours when we map it. */
 		wc.x = e->x;


-- 
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.