[gtk/global-coords: 3/7] menu: Only set position in one place
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/global-coords: 3/7] menu: Only set position in one place
- Date: Wed, 29 May 2019 22:07:16 +0000 (UTC)
commit 7d60ada809357398a32625549ff7389158d9a678
Author: Benjamin Otte <otte redhat com>
Date: Fri Apr 26 17:50:44 2019 +0200
menu: Only set position in one place
gtk/gtkmenu.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c
index a0929d3cc7..65b84e5f4a 100644
--- a/gtk/gtkmenu.c
+++ b/gtk/gtkmenu.c
@@ -1814,6 +1814,7 @@ gtk_menu_update_scroll_offset (GtkMenu *menu,
gpointer user_data)
{
GtkBorder arrows_border;
+ int offset;
g_return_if_fail (GTK_IS_MENU (menu));
@@ -1821,8 +1822,8 @@ gtk_menu_update_scroll_offset (GtkMenu *menu,
return;
get_arrows_border (menu, &arrows_border);
- menu->priv->scroll_offset = arrows_border.top + (final_rect->y - flipped_rect->y);
- gtk_menu_scroll_to (menu, menu->priv->scroll_offset);
+ offset = arrows_border.top + (final_rect->y - flipped_rect->y);
+ gtk_menu_scroll_to (menu, offset);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]