From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 47234@debbugs.gnu.org, juri@linkov.net
Subject: bug#47234: 28.0.50; frame-inner-height fails without window system on tab-bar-height
Date: Thu, 18 Mar 2021 14:57:52 +0000 [thread overview]
Message-ID: <877dm4o6fj.fsf@tcd.ie> (raw)
In-Reply-To: <837dm4h6uk.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 18 Mar 2021 16:30:43 +0200")
[-- Attachment #1: Type: text/plain, Size: 1130 bytes --]
Eli Zaretskii <eliz@gnu.org> writes:
>> From: "Basil L. Contovounesios" <contovob@tcd.ie>
>> Date: Thu, 18 Mar 2021 13:41:04 +0000
>> Cc: juri linkov <juri@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?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: tab-bar.diff --]
[-- Type: text/x-diff, Size: 527 bytes --]
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)
[-- Attachment #3: Type: text/plain, Size: 20 bytes --]
Thanks,
--
Basil
next prev parent reply other threads:[~2021-03-18 14:57 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-18 13:41 bug#47234: 28.0.50; frame-inner-height fails without window system on tab-bar-height Basil L. Contovounesios
2021-03-18 14:30 ` Eli Zaretskii
2021-03-18 14:57 ` Basil L. Contovounesios [this message]
2021-03-18 15:12 ` Eli Zaretskii
2021-03-18 15:22 ` Basil L. Contovounesios
2021-03-18 15:53 ` Eli Zaretskii
2021-03-18 17:07 ` Juri Linkov
2021-03-18 17:51 ` martin rudalics
2021-03-18 18:55 ` Eli Zaretskii
2021-03-19 8:14 ` martin rudalics
2021-03-19 8:22 ` Eli Zaretskii
2021-03-18 18:48 ` Eli Zaretskii
2021-03-18 19:00 ` Juri Linkov
2021-03-18 20:05 ` Eli Zaretskii
2021-03-18 22:24 ` Basil L. Contovounesios
2021-03-19 7:02 ` Eli Zaretskii
2021-03-19 8:15 ` martin rudalics
2021-03-26 17:44 ` Basil L. Contovounesios
2021-03-18 15:51 ` martin rudalics
2021-03-18 17:36 ` Juri Linkov
2021-03-26 17:46 ` Basil L. Contovounesios
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877dm4o6fj.fsf@tcd.ie \
--to=contovob@tcd.ie \
--cc=47234@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=juri@linkov.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.