Subject: Re: bug#22000: Patch addressing the menu-bar frame-resize interaction

From: Robert Pluim <[email-masked]>
Date: Wed, 24 Oct 2018 13:52:39 +0200

martin rudalics <[email-masked]> writes:

>> I donʼt understand how this could be Vivek's issue in any case: this
>> particular problem existed already in emacs-26.
>
> I slowly begin to understand the issue.  The vertical scroll bar shows
> up as soon as the menu bar window gets high enough to make the slider
> fit.  Is that correct?  One thing I do not understand then: Do we
> really call xg_update_scrollbar_pos for the menu bar's scroll bar?  If
> so, how?  IIUC the scroll bar code is oblivious to menu bar windows.
>

The vertical scroll bar shows up immediately the menu bar is
drawn. xg_update_scrollbar_pos is not called for it at all. But see below.

>> Now the vertical scrollbar on the right of the menubar, *that* might
>> be Vivek's to solve (presumably thereʼs a need to tell the menubar
>> widget not to add that scrollbar).
>
> Agreed.

And in fact, after digging through some more GTK docs, itʼs as simple
as changing

  gtk_scrolled_window_set_policy (sw, scroll_policy, GTK_POLICY_AUTOMATIC);

to

  gtk_scrolled_window_set_policy (sw, scroll_policy, GTK_POLICY_NEVER);
  
in Vivek's patch. Vivek, does that make sense? I donʼt think we ever
want the menu bar to show a vertical scroll bar.

Note that this also fixes the visual glitch that I saw with the
dotted line and the menubar text descender truncation.

Regards

Robert