After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 738321 - GtkMenu has unnecessary scroll buttons
GtkMenu has unnecessary scroll buttons
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
3.14.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 733177 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-10-10 18:59 UTC by Alberts Muktupāvels
Modified: 2014-11-03 03:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot (110.56 KB, image/png)
2014-10-10 18:59 UTC, Alberts Muktupāvels
  Details
gtkmenu: fix unnecessary scroll buttons (1.51 KB, patch)
2014-10-31 01:20 UTC, Alberts Muktupāvels
committed Details | Review

Description Alberts Muktupāvels 2014-10-10 18:59:30 UTC
Created attachment 288252 [details]
Screenshot

Please see screenshoot for problem with gnome-panel.

https://bugzilla.gnome.org/show_bug.cgi?id=738158
This bug has screenshoot with same problem. When GtkMenu hits top panel it is adding scroll buttons when it should not do that. Bug itself is about different problem.

Looks like this is result after enabling csd for GtkMenu:
https://git.gnome.org/browse/gtk+/commit/gtk/gtkmenu.c?id=dae252e3d21c60e07076d2ab3ef81f9f99e19fe0

When menu is opened it has correct height in first calls in size_allocate and/or get_preferred_height. But then it has height -5px.

https://git.gnome.org/browse/gtk+/commit/gtk/gtkmenu.c?id=e9ed210b0be283676f54bcb232aebc66b9741825
This commit adjust y value. Looks like shadow is 5px and it is causing GtkMenu to get 5px smaller height.

In my example gnome-panel has 26px height. y for GtkMenu should be 26, but removing top shadow it is 21. That means 5px out of real screen space.

Same thing happens if gnome-panel is vertical and menu hits screen top/y- 0px. Then it will try to position menu -5px out of screen.

Any ideas how to fix this?

Maybe in case when window is at top of screen top shadow should not be added - border.top = 0;
Comment 1 Alberts Muktupāvels 2014-10-10 21:08:47 UTC
This can be reproducible in GNOME Shell with GNOME Terminal. Open terminal, make it fullscreen and open any item in menubar.
Comment 2 Alberts Muktupāvels 2014-10-31 01:20:09 UTC
Created attachment 289707 [details] [review]
gtkmenu: fix unnecessary scroll buttons
Comment 3 Alberts Muktupāvels 2014-10-31 10:27:34 UTC
*** Bug 733177 has been marked as a duplicate of this bug. ***
Comment 4 Matthias Clasen 2014-11-01 16:13:48 UTC
the fullscreen <> menubar problem was addressed in 46ff5ef6ce71322b85f05655617280c0b25ec7f6
Comment 5 Matthias Clasen 2014-11-01 16:14:10 UTC
Review of attachment 289707 [details] [review]:

this seems correct, anyway
Comment 6 David Ronis 2014-11-02 00:25:55 UTC
I tried the patch and it has fixed the problem.

Thanks.
Comment 7 Alberts Muktupāvels 2014-11-02 20:00:45 UTC
(In reply to comment #5)
> Review of attachment 289707 [details] [review]:
> 
> this seems correct, anyway

Thanks! Are you going to commit this patch in master and gnome-3-14 branches?
Comment 8 Matthias Clasen 2014-11-03 03:11:22 UTC
Attachment 289707 [details] pushed as bdaef1f - gtkmenu: fix unnecessary scroll buttons