[gtk+] Fixed GtkMenuItem to not access the menu->requisition but get the minimum size request instead.
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Fixed GtkMenuItem to not access the menu->requisition but get the minimum size request instead.
- Date: Sat, 21 Aug 2010 01:16:58 +0000 (UTC)
commit 10ceb9da681029cc5374606aafd4af36687831c0
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Fri Aug 20 21:15:01 2010 -0400
Fixed GtkMenuItem to not access the menu->requisition but get the minimum size request instead.
gtk/gtkmenuitem.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c
index 10c83bc..8bdc5b4 100644
--- a/gtk/gtkmenuitem.c
+++ b/gtk/gtkmenuitem.c
@@ -1932,6 +1932,7 @@ gtk_menu_item_position_menu (GtkMenu *menu,
gint vertical_offset;
gint parent_xthickness;
gint available_left, available_right;
+ GtkRequisition requisition;
g_return_if_fail (menu != NULL);
g_return_if_fail (x != NULL);
@@ -1945,8 +1946,10 @@ gtk_menu_item_position_menu (GtkMenu *menu,
direction = gtk_widget_get_direction (widget);
- twidth = GTK_WIDGET (menu)->requisition.width;
- theight = GTK_WIDGET (menu)->requisition.height;
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (menu), &requisition, NULL);
+
+ twidth = requisition.width;
+ theight = requisition.height;
screen = gtk_widget_get_screen (GTK_WIDGET (menu));
monitor_num = gdk_screen_get_monitor_at_window (screen, menu_item->event_window);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]