Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Menus on MATE Panel do not have up and down scroll buttons on low screen resolutions or with long lists #920

Closed
N0rbert opened this issue Feb 3, 2019 · 21 comments

Comments

@N0rbert
Copy link

N0rbert commented Feb 3, 2019

Expected behaviour

applications menu has scroll buttons as shown on screenshot from Ubuntu MATE 16.04 LTS:

1604-top

Actual behaviour

applications menu does not have scroll buttons and looks non-intuitive as shown on screenshot from Ubuntu MATE 18.04 LTS:

1804-top

Steps to reproduce the behaviour

  1. Have Ubuntu 18.04 LTS (or newer) installed
  2. Switch MATE Panel layout to Traditional
  3. Install many applications to get scrolling in Applications, Places, System menu (or change screen resolution to minimal - it is easy on VM)
  4. Open Applications (or Places, or System) menu

MATE general version

1.20 as in Ubuntu MATE 18.04 LTS

Package version

mate-panel 1.20.1-3ubuntu1

Linux Distribution

Ubuntu 18.04 LTS

Link to downstream report of your Distribution

https://bugs.launchpad.net/ubuntu/+source/mate-panel/+bug/1814421


Notes: this bug is actual for Ubuntu 18.04 LTS, 18.10 and upcoming Ubuntu 19.04 with Debian 10.

@lukefromdc
Copy link
Member

lukefromdc commented Feb 3, 2019

CONFIRMED on Debian Unstable: even worse, those areas of the menu that render off-screen are not displayed. I need to see if this is fallout from GTK changes or from replacing deprecated gtk_menu_popup with gtk_menu_popup_at_widget (testing the panel button here)

To duplicate this bug, first turn off icons on the desktop in dconf-editor so you don't rearrance your desktop icons. Then open up the display capplet and lower screen resolution until menus no longer fit the screen. Other menus sometimes show scrollbars when they get an item added but don't get resized so its not like GTK just made this impossible.

@lukefromdc
Copy link
Member

I just confirmed the problem commits as being the replacement of gtk_menu_popup with gtk_menu_popup_at_widget. For the menu button that is
0022441
which does not revert clean but can be manually reversed, also requiring reverting
3630b20
in order to get back the position function.

Doing that brings back the scrollbars on the panel button but not the panel menubar, which was deliberately not reverted for this test so as to provide a standard of comparison. I now have to see if it is possible in GTK 3.24 to keep the scrollbars at all without using deprecated old style gtk_menu_popup .

@lukefromdc
Copy link
Member

Got same problem with gtk_menu_popup_at_pointer

@raveit65
Copy link
Member

raveit65 commented Feb 3, 2019

gtk problem?

@lukefromdc
Copy link
Member

lukefromdc commented Feb 3, 2019

I tested gnome-panel, and found that gnome-panel's menu button will show scrollbars but NOT the menubar.

I then found the scrollbars in mate-panel's menubutton and menubar work fine with gtk3 rolled back to gtk-3.22.30 but neither works with GTK 3.24, so we have either a gtk change that we need to adapt to or a gtk bug, not sure which. The gnome-panel code is a bit more complex, my guess is the menu is not getting this display size constraints passed to it with GTK 3.24 in our code but is getting it OK in gnome-panel's menu button (but not their menu bar)

@lukefromdc
Copy link
Member

I just found that adding
gtk_menu_reposition(button->priv->menu);
will fix this, PR coming shortly

@lukefromdc
Copy link
Member

So far I have been able to fix the menu button and the alt-F1 menu popup but NOT the menubar, that code might be internal to GTK and beyond our reach without reimplementing menubar. That might explain why the menubar has this issue in gnome-panel too.

I tested rolling back mate-panel and mate-menus all the way to a 1.18 version (before any of the popup deprecation work) and the menubar still would not show scrollbars. This again shows that the change is inside GTK.

@lukefromdc
Copy link
Member

#922
fixes the button and alt-F1 menus, but NOT the menubar menus.
Maybe @muktupavels can find out if a change to GtkMenu needs work on this end or if there is a bug in GTK itself that needs to be fixed on that end?

@N0rbert
Copy link
Author

N0rbert commented Feb 4, 2019

Thank you for analysis, @lukefromdc!
I forgot to mention that I first seen this issue in full-screen 1366x768 resolution after installation of all Debian Edu packages on Buster/sid (10) with MATE 1.20.4 and by opening Applications→Education (it was very long list without scroll arrows):
debian-edu10
I have opened mozo (Main Menu window) in the right to show that KGeography is not really last position of the list.

@muktupavels
Copy link
Contributor

I would suggest to first retest with current GTK 3-24 branch (if that has not been done already):
https://gitlab.gnome.org/GNOME/gtk/commits/gtk-3-24/gtk/gtkmenu.c

And in case it is still reproducible open issue in GTK...

@lukefromdc
Copy link
Member

I see GTK 3.24.5 just came out, I will build and test that now

@lukefromdc
Copy link
Member

Problem still exists with GTK 3.24.5-and did NOT exist with GTK 3.24.3, which I built on Jan 15. I suspect
https://gitlab.gnome.org/GNOME/gtk/commit/00486efd51b29e234cfb180b814dd584805ebae5
of being the problem commit, but do not have an account on GNOME's local gitlab instance to open an issue report.

@muktupavels
Copy link
Contributor

Perhaps it is time to create one? After all GTK is important part of your desktop environment...

@lukefromdc
Copy link
Member

I got locked out of the last account I had with GNOME. I use extremely locked down privacy browsers that break the majority of the commercial Internet and hard block things like Facebook and Google. I can try the new site, but I will not have time to debug it if it rejects an attempt to make an account. Forming accounts on new sites has always been an issue for me, and I won't connect a default browser to the Internet to get around that under any circumstances.

@lukefromdc
Copy link
Member

I just found that the GNOME gitlab can piggyback off of Github for account sign-in (as bountysource does), solving the account issue. Let's hope this one keeps

@lukefromdc
Copy link
Member

The issue seems to be a new case of
https://gitlab.gnome.org/GNOME/gtk/issues/17
which may have been the reason for those three menu commits.

@lukefromdc
Copy link
Member

Just posted
https://gitlab.gnome.org/GNOME/gtk/issues/17#note_429104
"menus don't scroll anymore"
as that issue is a months-old example of similar behavior that apparently has gotten more extensive

@lukefromdc
Copy link
Member

Turns out that was a GTK4 only issue report, new issue posted at
https://gitlab.gnome.org/GNOME/gtk/issues/1651

@lukefromdc
Copy link
Member

https://gitlab.gnome.org/GNOME/gtk/merge_requests/565
fixes this, so if get gets merged we will be able to close this

@raveit65
Copy link
Member

raveit65 commented Feb 7, 2019

I did run for myself in this issue with fedora rawhide.
No chance to select a keyboard layout from mate-keyboard-properties UI for my language :-/
So this issue isn't limited to the panel.

@lukefromdc
Copy link
Member

https://gitlab.gnome.org/GNOME/gtk/merge_requests/565 has been merged with
https://gitlab.gnome.org/GNOME/gtk/commit/1d4eac211c09624d29b9309e2b92173f7477a9b7
which will be included in GTK 3.24.6 whenever it is released, so we can now close this. Fix is in GTK's git master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants