[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tabs

From: Eli Zaretskii
Subject: Re: Tabs
Date: Wed, 09 Oct 2019 15:32:18 +0300

Martin, can you please explain the rationale behind this code in
x_change_tool_bar_height (and similar code in the w32 variant)?

  /* Recalculate toolbar height.  */
  f->n_tool_bar_rows = 0;
  if (old_height == 0
      && (!f->after_make_frame
          || NILP (frame_inhibit_implied_resize)
          || (CONSP (frame_inhibit_implied_resize)
              && NILP (Fmemq (Qtool_bar_lines, frame_inhibit_implied_resize)))))
    f->tool_bar_redisplayed = f->tool_bar_resized = false;

  adjust_frame_size (f, -1, -1,
                       && (NILP (fullscreen =
                                 get_frame_param (f, Qfullscreen))
                           || EQ (fullscreen, Qfullwidth))) ? 1
                      : (old_height == 0 || height == 0) ? 2
                      : 4),
                     false, Qtool_bar_lines);

  f->tool_bar_resized = f->tool_bar_redisplayed;

Here are the questions that I couldn't answer myself:

 . why the tool_bar_resized flag is reset when
   frame-inhibit-implied-resize is nil, i.e. implied resizing is _NOT_
   inhibited? shouldn't it be the other way around?

 . the above resets the tool_bar_redisplayed flag, then uses it after
   the call to adjust_frame_size; but nothing in that call can ever
   change the value of the tool_bar_redisplayed flag, so I don't
   understand what the code tries to accomplish.

 . which code is supposed to reset the tool_bar_resized flag?  AFAICT,
   once set, it stays set, at least in "emacs -Q".  Did I miss
   something?  Same question regarding the tool_bar_redisplayed flag.

The real motivation for these questions is the problem with
redisplaying the frame when tab-bar is turned on by "C-x 6 f", but
since the tab-bar code was simply copied from the tool-bar code, I
find myself wondering about the latter, and hope you can show me the
light there.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]