GNU bug report logs - #78418
31.0.50; Change in fit-frame-to-buffer doesn't work with transient-posframe

Previous Next

Package: emacs;

Reported by: Gerd Möllmann <gerd.moellmann <at> gmail.com>

Date: Wed, 14 May 2025 07:22:01 UTC

Severity: normal

Found in version 31.0.50

Full log


View this message in rfc822 format

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: yhaoxie <at> gmail.com, 78418 <at> debbugs.gnu.org
Subject: bug#78418: 31.0.50; Change in fit-frame-to-buffer doesn't work with transient-posframe
Date: Wed, 14 May 2025 16:24:28 +0200
Gerd Möllmann <gerd.moellmann <at> gmail.com> writes:

> (defun transient--fit-window-to-buffer (window)
>   (set-window-parameter window 'window-preserved-size nil)
>   (let ((fit-window-to-buffer-horizontally t)
>         (window-resize-pixelwise t)
>         (window-size-fixed nil))
>     (cond ((not (window-parent window))
>            (fit-frame-to-buffer (window-frame window) nil nil nil
>                                 transient-minimal-frame-width))
>           ((eq (car (window-parameter window 'quit-restore)) 'other)
>            ;; Grow but never shrink window that previously displayed
>            ;; another buffer and is going to display that again.
>            (fit-window-to-buffer window nil (window-height window)))
>           ((fit-window-to-buffer window nil 1))))
>   (set-window-parameter window 'window-preserved-size
>                         (list (window-buffer window)
>                               (window-body-width window t)
>                               (window-body-height window t))))
>
> Should that have bound frame-resize-pixelwise? And if so why? I think I
> understand more or less what the doc string of that variable says, but
> the transient doesn't have anything I recognize that would make
> pixel-wise resizing necessary. Or is some internal border or something?
> Sorry, I'm in unknown territory here.

When I add a binding for frame-resize-pixelwise, things seem to work on
the GUI, BTW.




This bug report was last modified 86 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.