Work around a bug where the tab-line isn't taken into account

In Emacs before version 31, window-inside-absolute-pixel-edges returns
the wrong y-offset when the per-buffer tab-line is enabled. The tab-line
is taken into account when computing the window's height, so we adjust
the y-offset after computing the height.

Fixed upstream in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=75576.

* exwm-layout.el (exwm-layout--show): Adjust the window's y-offset to
include the tab-line.  (Bug emacs-exwm/exwm#114)
This commit is contained in:
Steven Allen 2025-01-15 16:31:51 -08:00
parent 26d24e534a
commit 9cdfe95066

View file

@ -117,6 +117,8 @@ See variable `exwm-layout-auto-iconify'."
(width (- (pop edges) x))
(height (- (pop edges) y))
frame-x frame-y frame-width frame-height)
(when (eval-when-compile (< emacs-major-version 31))
(setq y (+ y (window-tab-line-height window))))
(with-current-buffer (exwm--id->buffer id)
(when exwm--floating-frame
(setq frame-width (frame-pixel-width exwm--floating-frame)