-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
rhel-9.4
-
None
-
No
-
Low
-
rhel-jotnar
-
ssg_display
-
None
-
False
-
False
-
-
None
-
None
-
None
-
None
-
Unspecified
-
Unspecified
-
Unspecified
-
None
Description of problem:
See Eclipse bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=564910
Version-Release number of selected component (if applicable):
GTK 3.22.30-5 (gtk3-3.22.30-5.el7.x86_64)
How reproducible:
In Eclipse, reproducible with steps listed here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=564910#c1
See video attached to the Eclipse bug: https://bugs.eclipse.org/bugs/attachment.cgi?id=287854
So far we have no GTK+ snippet (or Eclipse SWT only snippet) to reproduce the problem with.
Actual results:
Context menu shows ever-growing blank area when scrolling down.
Expected results:
Context menu has no blank area when scrolling down.
Additional info:
After adding prints, it seems that scroll_offset has very high values while this method runs (when the bug occurs):
static void
gtk_menu_scroll_by (GtkMenu *menu,
gint step)
While checking the GTK+ code in gtkmenu.c, I noticed this bug and patch:
https://bugzilla.gnome.org/show_bug.cgi?id=678113
https://github.com/GNOME/gtk/commit/bd3ca2b30efc534f8b7c18dfd8a9f072592044c7
After adding clamping to the method above, the blank area of the menu was reduced to only 1 blank item at most (while not ideal, still a lot better than before, see attached video "bug564910_gtkmenu_offset_clamp.mp4"):
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c
index 8f7715022f..09cbec26ab 100644
— a/gtk/gtkmenu.c
+++ b/gtk/gtkmenu.c
@@ -4175,7 +4175,12 @@ gtk_menu_scroll_by (GtkMenu *menu,
offset = priv->requested_height - view_height;
if (offset != priv->scroll_offset)
+
}
static gboolean