Subject: bug#75576: [PATCH] Take the tab-line into account when computing the window edges

From: Steven Allen <[email-masked]>
Date: Wed, 15 Jan 2025 00:03:29 -0800

Tags: patch

This was causing EXWM to mis-calculate the window height when centaur
tabs were used. See https://github.com/emacs-exwm/exwm/pull/114.

>From 00400301d384d4827acc763c7847d8bc2516702f Mon Sep 17 00:00:00 2001
From: Steven Allen <[email-masked]>
Date: Tue, 14 Jan 2025 23:56:08 -0800
Subject: [PATCH] Take the tab-line into account when computing the window
 edges

window-body-height correctly subtracts the tab-line's height but
window-edges did not add this same height to the y-offset.

See https://github.com/emacs-exwm/exwm/pull/114

* lisp/window.el (window-edges): Add the tab-line-height to the y-offet
of the window body.
---
 lisp/window.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/window.el b/lisp/window.el
index 886128c7daa..47c92fdcd42 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -3828,7 +3828,8 @@ window-edges
 	 (top-body
 	  (when body
 	    (+ (window-pixel-top window) border-width
-	       (window-header-line-height window))))
+	       (window-header-line-height window)
+               (window-tab-line-height window))))
 	 (right (+ left (if pixelwise
 			    (window-pixel-width window)
 			  (window-total-width window))))
-- 
2.48.1