Take arrows into account when clamping the offset. Fixes #95758.

Thu Oct 17 22:09:05 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkmenu.c (gtk_menu_scroll_to): Take arrows into
	account when clamping the offset. Fixes #95758.
This commit is contained in:
Soeren Sandmann 2002-10-17 20:09:39 +00:00 committed by Søren Sandmann Pedersen
parent 79193611f4
commit a9d26e1478
7 changed files with 36 additions and 6 deletions

View File

@ -1,3 +1,8 @@
Thu Oct 17 22:09:05 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkmenu.c (gtk_menu_scroll_to): Take arrows into
account when clamping the offset. Fixes #95758.
Wed Oct 16 15:19:44 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkkeys-x11.c: Fix from Phil Blundell for

View File

@ -1,3 +1,8 @@
Thu Oct 17 22:09:05 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkmenu.c (gtk_menu_scroll_to): Take arrows into
account when clamping the offset. Fixes #95758.
Wed Oct 16 15:19:44 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkkeys-x11.c: Fix from Phil Blundell for

View File

@ -1,3 +1,8 @@
Thu Oct 17 22:09:05 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkmenu.c (gtk_menu_scroll_to): Take arrows into
account when clamping the offset. Fixes #95758.
Wed Oct 16 15:19:44 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkkeys-x11.c: Fix from Phil Blundell for

View File

@ -1,3 +1,8 @@
Thu Oct 17 22:09:05 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkmenu.c (gtk_menu_scroll_to): Take arrows into
account when clamping the offset. Fixes #95758.
Wed Oct 16 15:19:44 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkkeys-x11.c: Fix from Phil Blundell for

View File

@ -1,3 +1,8 @@
Thu Oct 17 22:09:05 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkmenu.c (gtk_menu_scroll_to): Take arrows into
account when clamping the offset. Fixes #95758.
Wed Oct 16 15:19:44 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkkeys-x11.c: Fix from Phil Blundell for

View File

@ -1,3 +1,8 @@
Thu Oct 17 22:09:05 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkmenu.c (gtk_menu_scroll_to): Take arrows into
account when clamping the offset. Fixes #95758.
Wed Oct 16 15:19:44 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkkeys-x11.c: Fix from Phil Blundell for

View File

@ -2538,12 +2538,6 @@ gtk_menu_scroll_to (GtkMenu *menu,
view_height -= (border_width + widget->style->ythickness) * 2;
menu_height = widget->requisition.height - (border_width + widget->style->ythickness) * 2;
offset = CLAMP (offset, 0, menu_height - view_height);
/* Scroll the menu: */
if (GTK_WIDGET_REALIZED (menu))
gdk_window_move (menu->bin_window, 0, -offset);
x = border_width + widget->style->xthickness;
y = border_width + widget->style->ythickness;
@ -2585,6 +2579,12 @@ gtk_menu_scroll_to (GtkMenu *menu,
y += MENU_SCROLL_ARROW_HEIGHT;
}
offset = CLAMP (offset, 0, menu_height - view_height);
/* Scroll the menu: */
if (GTK_WIDGET_REALIZED (menu))
gdk_window_move (menu->bin_window, 0, -offset);
if (GTK_WIDGET_REALIZED (menu))
gdk_window_move_resize (menu->view_window,
x,