GNU bug report logs - #46827
Broken initial size of GTK3 frame

Previous Next

Package: emacs;

Reported by: martin rudalics <rudalics <at> gmx.at>

Date: Sun, 28 Feb 2021 09:32:01 UTC

Severity: normal

Tags: fixed

Fixed in version 28.1

Done: martin rudalics <rudalics <at> gmx.at>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Juri Linkov <juri <at> linkov.net>
Cc: 46827 <at> debbugs.gnu.org
Subject: bug#46827: Broken initial size of GTK3 frame
Date: Mon, 10 May 2021 10:23:26 +0200
>>> But maybe sometimes the value of tab-bar-lines
>>> becomes more than 1?
>>
>> It's 2 after the tab bar has been produced for the first time by the
>> display code.  And that is what's been causing trouble for you.  The
>> value was oscillating between 1 and 2.
>
> Very strange indeed, I can't find the constant 2 in the source code.

Because for X it's done in x_change_tab_bar_height as (I suppose you
wrote that):


x_change_tab_bar_height (struct frame *f, int height)
{
  int unit = FRAME_LINE_HEIGHT (f);
  int old_height = FRAME_TAB_BAR_HEIGHT (f);
  int lines = (height + unit - 1) / unit;
  Lisp_Object fullscreen = get_frame_param (f, Qfullscreen);

  /* Make sure we redisplay all windows in this frame.  */
  fset_redisplay (f);

  /* Recalculate tab bar and frame text sizes.  */
  FRAME_TAB_BAR_HEIGHT (f) = height;
  FRAME_TAB_BAR_LINES (f) = lines;
  store_frame_param (f, Qtab_bar_lines, make_fixnum (lines));


If you call this with a HEIGHT that is larger than FRAME_LINE_HEIGHT you
already get a `tab-bar-lines' parameter that is larger than 1.  With a
very small FRAME_LINE_HEIGHT and/or a very tall tab bar you may get more
than 2 lines.

This is an idiosyncrasy of our "live in a graphic world but think in
terms of a TTY" philosophy.  The parameter should be a boolean and have
been called something like 'tab_bar_p' but there's no chance to change
that any more.

martin




This bug report was last modified 4 years and 11 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.