Subject: Re: bug#79351: 30.2; window-resize-symbollwise

From: martin rudalics <[email-masked]>
Date: Mon, 1 Sep 2025 10:37:32 +0200

> That was because of performance issues, right?  I see nothing in that
 > discussion that objects to the character-level dragging in principle.
 >
 > I see no reason not to allow that as an option.  Patches welcome.

I attach a patch supposed to fix your earlier

  According to the manual, window-resize-pixelwise = nil is what you
  want.  However, it currently doesn't affect dragging the window border
  with the mouse, AFAIU.  Martin, am I right?  This could be a simple
  omission.

But it's still sluggish as back in 2014, the mouse cursor moves far
ahead of the lines to drag and it refuses to move a mode line with
'mouse-fine-grained-tracking' non-nil.  Likely remember_mouse_glyph
interferes here.

martin

diff --git a/lisp/mouse.el b/lisp/mouse.el
index 907a4883230..83692afb525 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -905,7 +905,11 @@ mouse-drag-line
 				 (> position (+ (window-pixel-left window)
 						(window-pixel-width window)))))
 		  (setq dragged t)
-		  (adjust-window-trailing-edge window growth t t))
+		  (unless window-resize-pixelwise
+		    (setq growth (min (/ growth (frame-char-width frame)) 1)))
+		  (unless (zerop growth)
+		    (adjust-window-trailing-edge
+		     window growth t window-resize-pixelwise)))
 		(setq last-position position))
 	       (t
 		;; Drag bottom edge of `window'.
@@ -936,7 +940,11 @@ mouse-drag-line
 				 (> position (+ (window-pixel-top window)
 						(window-pixel-height window)))))
 		  (setq dragged t)
-		  (adjust-window-trailing-edge window growth nil t))
+		  (unless window-resize-pixelwise
+		    (setq growth (min (/ growth (frame-char-height frame)) 1)))
+		  (unless (zerop growth)
+		    (adjust-window-trailing-edge
+		     window growth nil window-resize-pixelwise)))
 		(setq last-position position)))))
            (old-track-mouse track-mouse))
       ;; Start tracking.  The special value 'dragging' signals the