yanghaoxie / transient-posframe

GNU General Public License v3.0
31 stars 8 forks source link

posframes are 1 line tall on emacs 29 and 30 #5

Open orzechowskid opened 9 months ago

orzechowskid commented 9 months ago

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

Dev380 commented 9 months ago

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.

weirdvic commented 9 months ago

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
Jdaco commented 8 months ago

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))))
seagle0128 commented 2 weeks ago

It doesn't work on 30+. Is the project dead?