emacs-devel
[Top][All Lists]
Advanced

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

Re: Tabs


From: martin rudalics
Subject: Re: Tabs
Date: Thu, 10 Oct 2019 11:15:55 +0200

> Ah, so these are one-off flags, and not indications of the resize,
> i.e. they are not supposed to be sensitive to, say, when a tool bar
> becomes too large for one line and needs two, is that so?

They are one-off in the following sense:

(1) Initially the flags are off.  redisplay_tool_bar unconditionally
    sets f->tool_bar_redisplayed to true every time it runs, so
    redisplay_tool_bar is, by design, agnostic of the underlying
    mechanism.

(2) The mechanism for exceptionally allowing to change the frame
    height when a tool bar height shall be established is confined to
    the change_tool_bar_height functions and their GTK counterpart.
    There, f->tool_bar_redisplayed is reset if certain conditions are
    met so any earlier calculation by redisplay_tool_bar is forgotten
    - don't ask me if such a calculation could have happened in
    practice, I don't remember.

    In either case the mechanism is only sharpened here and as we have
    seen with Bug#37609 its effect may trigger a long time after the
    initial frame has been made.  Maybe we could inhibit it by having
    any caller(s) of redisplay_tool_bar set f->tool_bar_redisplayed
    even if they do not call redisplay_tool_bar.  But I'm not sure.
    ISTR that I tried alternative solutions for this but was always
    surprised at how late in the frame creation phase the tool bar
    could take on its final, exact size.

(3) Once the frame has been made and f->tool_bar_resized is set, the
    latter is never reset again and it's really one-off in the sense
    you described.

>> As you mentioned earlier, tab bars are initially off and the tool bar
>> is on.  Maybe that's the cause of the problem.
>
> No, I think the cause of the problem is that we have no equivalent of
> "C-x 6 f" that turns on the tool bar as a side effect of a command
> that displays a buffer.

I'm missing you here.  Do you mean that displaying a tool bar for the
first time in an Emacs session on a specific frame when you display a
certain buffer on that frame would have a similar dramatic effect?
Couldn't you verify that?

> But that's a guess, because I've just
> established with Jimmy's help that even the call to redraw_frame
> doesn't cause the expected effect.  Which completely stumps me, and I
> need to think about it before I come with more ideas (_if_ I come with
> more ideas)...

I'm still not entirely sure whether it was a good idea to cargo cult
the tab bar code from the tool bar code.  Not that I have a
substantially better offer.  As a matter of fact, we should have
provided a good pseudo window mechanism for that.

martin



reply via email to

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