GNU bug report logs -
#47234
28.0.50; frame-inner-height fails without window system on tab-bar-height
Previous Next
Reported by: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Date: Thu, 18 Mar 2021 13:42:02 UTC
Severity: normal
Tags: fixed
Found in versions 27.1.91, 28.0.50
Fixed in version 27.2
Done: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 47234 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
>> Date: Thu, 18 Mar 2021 13:41:04 +0000
>> Cc: juri linkov <juri <at> linkov.net>
>>
>> The obvious band-aid is to check (fboundp 'tab-bar-height) in
>> frame-inner-height, but shouldn't we count 1 line when tab-bar-mode is
>> enabled even --without-x? IOW, can/should tab-bar-height or similar be
>> defined regardless of HAVE_WINDOW_SYSTEM? What's TRT here?
>
> TRT is to teach Emacs to return the tab-bar height on TTY frames as
> well. But I don't think defining tab-bar-height on TTY frames is the
> right way: the tab-bar is always 1 line high on those frames, so we
> could simply use that hardcoded value instead of signaling an error, I
> think.
I'm not familiar with the tab bar, but I get the impression it's not
that simple. IIUC no lines should be subtracted if tab-bar-mode is off,
and even if it's on, the tab bar can be hidden subject to tab-bar-show.
That's why I was wondering whether this logic can/should be packed into
a single place (whether Ftab_bar_height or other I don't know).
Is the following close to TRT?
[tab-bar.diff (text/x-diff, inline)]
diff --git a/lisp/frame.el b/lisp/frame.el
index b5a8e0ed72..f4b8f1c418 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -1370,7 +1370,9 @@ frame-inner-height
FRAME defaults to the selected frame."
(setq frame (window-normalize-frame frame))
(- (frame-native-height frame)
- (tab-bar-height frame t)
+ (if (fboundp 'tab-bar-height)
+ (tab-bar-height frame t)
+ (frame-parameter frame 'tab-bar-lines))
(* 2 (frame-internal-border-width frame))))
(defun frame-outer-width (&optional frame)
[Message part 3 (text/plain, inline)]
Thanks,
--
Basil
This bug report was last modified 4 years and 140 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.