GTK 3.24.5: No scrollbars shown on menu if out of vertical space and gtk_menu_popup_at_widget/pointer used
Problem: when a menu pops up taking too much space for the screen, it gets no scrollbars unless it is popped up with deprecated gtk_menu_popup
, in which case scrollbars work fine. If either gtk_menu_popup_at_widget
or gtk_menu_popup_at_pointer
are used (gtk_menu_popup_at_rectangle
not tested), the scrollbars do not appear with GTK 3.24 from recent git. Scrollbars also do not appear on a menu popped up/down from a menubar.
Tested GTK 3.23 (menu scrollbars OK) a GTK 3.24.4+ build from the git branch as of Feb 2(no menu scrollbars) and GTK 3.24.5 (no menu scrollbars) on Debian Unstable with local builds of GTK 3 and glib 2.59.1 and mate-panel 1.21.4 from git master current as of Jan 29 (locally built package named mate-panel-gtk3_1.21.4+git20190129-1luke1_amd64.deb )
Original report against mate-panel for this at https://github.com/mate-desktop/mate-panel/issues/920 is an example of this, with screenshots of menus that when they are too tall to fit on a screen no longer show scrollbars but run off the screen and cannot be scrolled.
I suspect 00486efd "menu: Don't constrain initial menu size" of being the problem but not having done a bisect to individual commits am not sure. The behavior expected if this was the last commit applied however is exactly what I am seeing, indicating that followup commits 3e586a82 and c35878ec do not bring the scrollbars back in this case. Maybe the menu gets rendered before it can be force-resized or something is preventing that from working?
As a workaround for those menus that don't come from a menubar I was able to use
gtk_menu_reposition(GTK_MENU(menu));
in https://github.com/mate-desktop/mate-panel/pull/922 but that covers only the menubutton and alt-F1 popup menus and not the menubar, whose menus don't get scrollbars either in mate-panel or in gnome-panel, gnome-panel being free of the problem with the menu-button menus. I was not able to do anything about menus from the menubar in the way of workarounds in mate-panel's code.