transient-posframe icon indicating copy to clipboard operation
transient-posframe copied to clipboard

posframes are 1 line tall on emacs 29 and 30

Open orzechowskid opened this issue 1 year ago • 3 comments

transient-posframe is not behaving as expected when run on emacs 30. transient magit buffers are drawn in a posframe which is only 1 line in height.

keyboard input to the posframe (e.g. C-g) works correctly, and posframe itself also appears to work correctly (tested with vertico-posframe).

orzechowskid avatar Feb 26 '24 15:02 orzechowskid

I'm getting 1 line tall posframes only for transient frames also on dook emacs 29

Edit: pgtk and Wayland. Tested with WSL on X too but also pgtk and it seems to work correctly. Strange.

Dev380 avatar Feb 29 '24 15:02 Dev380

Same problem here

GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8) of 2023-09-02, modified by Debian

weirdvic avatar Feb 29 '24 15:02 weirdvic

Not sure why it isn't getting the correct height automatically, but I was able to set the correct height by setting :height in transient-posframe--show-buffer

(defun transient-posframe--show-buffer (buffer _alist)
  "Show BUFFER in posframe and we do not use _ALIST at this period."
  (when (posframe-workable-p)
    (let* ((posframe
	    (posframe-show buffer
                           :height (with-current-buffer buffer (1- (count-screen-lines (point-min) (point-max))))
			   :font transient-posframe-font
			   :position (point)
			   :poshandler transient-posframe-poshandler
			   :background-color (face-attribute 'transient-posframe :background nil t)
			   :foreground-color (face-attribute 'transient-posframe :foreground nil t)
			   :min-width transient-posframe-min-width
			   :min-height transient-posframe-min-height
			   :internal-border-width transient-posframe-border-width
			   :internal-border-color (face-attribute 'transient-posframe-border :background nil t)
			   :override-parameters transient-posframe-parameters)))
      (frame-selected-window posframe))))

Jdaco avatar Mar 02 '24 18:03 Jdaco