You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, first thank you for this package!
I've noticed there are some ugly in-between frames when resizing the box.
I'm on Fedora 40 with Emacs 31, the same behavior persists between i3 and Sway.
Personally I fixed this by overwriting a function in my config like this:
(setq prev-size '(0.0))
(defuneldoc-box--update-childframe-geometry (framewindow)
"Update the size and the position of childframe.FRAME is the childframe, WINDOW is the primary window."
(setcdr eldoc-box--markdown-separator-display-props nil)
(let* ((size
(window-text-pixel-size
window nilnil
(if (functionp eldoc-box-max-pixel-width) (funcall eldoc-box-max-pixel-width) eldoc-box-max-pixel-width)
(if (functionp eldoc-box-max-pixel-height) (funcall eldoc-box-max-pixel-height) eldoc-box-max-pixel-height)
t))
(width (car size))
(height (cdr size))
(width (+ width (frame-char-width frame))) ; add margin
(frame-resize-pixelwiset)
(pos (funcall eldoc-box-position-function width height)))
(if (not (equal prev-size size))
(eldoc-box--maybe-cleanup))
(setq prev-size size)
(set-frame-size frame width height t)
;; Set the display property back.
(setcdr eldoc-box--markdown-separator-display-props
'(:width text))
;; move position
(set-frame-position frame (car pos) (cdr pos))))
It's not perfect, because now sometimes there's a "flicking effect" (the box disappears for one frame) but I prefer it this way. The check (if (not (equal prev-size size)) is there so there isn't any flicking when the box isn't resized.
The text was updated successfully, but these errors were encountered:
Thank you! So IIUC you made Emacs to hide the frame before resizing it? I don't want to use this technique since, as you said, there might be flickering. The problem is probably due to Emacs's childframe implementation and the toolkit, wm and maybe x11/wayland. I would see if you can reproduce this with some minimal childframe and make a bug report to Emacs.
Hey, first thank you for this package!
I've noticed there are some ugly in-between frames when resizing the box.
I'm on Fedora 40 with Emacs 31, the same behavior persists between i3 and Sway.
Personally I fixed this by overwriting a function in my config like this:
It's not perfect, because now sometimes there's a "flicking effect" (the box disappears for one frame) but I prefer it this way. The check
(if (not (equal prev-size size))
is there so there isn't any flicking when the box isn't resized.The text was updated successfully, but these errors were encountered: