diff options
-rw-r--r-- | lib/ephy-gui.c | 12 | ||||
-rw-r--r-- | src/ephy-fullscreen-popup.c | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/ephy-gui.c b/lib/ephy-gui.c index 02aeffb3e..d5de8c76d 100644 --- a/lib/ephy-gui.c +++ b/lib/ephy-gui.c @@ -45,7 +45,7 @@ ephy_gui_sanitise_popup_position (GtkMenu *menu, g_return_if_fail (widget != NULL); - gtk_widget_size_request (GTK_WIDGET (menu), &req); + gtk_widget_get_preferred_size (GTK_WIDGET (menu), &req, NULL); monitor_num = gdk_screen_get_monitor_at_point (screen, *x, *y); gtk_menu_set_monitor (menu, monitor_num); @@ -71,7 +71,7 @@ ephy_gui_menu_position_tree_selection (GtkMenu *menu, GtkAllocation allocation; GdkRectangle visible; - gtk_widget_size_request (GTK_WIDGET (menu), &req); + gtk_widget_get_preferred_size (GTK_WIDGET (menu), &req, NULL); gdk_window_get_origin (gtk_widget_get_window (widget), x, y); gtk_widget_get_allocation (widget, &allocation); @@ -133,8 +133,8 @@ ephy_gui_menu_position_under_widget (GtkMenu *menu, container = gtk_widget_get_ancestor (widget, GTK_TYPE_CONTAINER); g_return_if_fail (container != NULL); - gtk_widget_size_request (widget, &req); - gtk_widget_size_request (GTK_WIDGET (menu), &menu_req); + gtk_widget_get_preferred_size (widget, &req, NULL); + gtk_widget_get_preferred_size (GTK_WIDGET (menu), &menu_req, NULL); screen = gtk_widget_get_screen (GTK_WIDGET (menu)); window = gtk_widget_get_window (widget); @@ -202,8 +202,8 @@ ephy_gui_menu_position_on_toolbar (GtkMenu *menu, toolbar = GTK_TOOLBAR (gtk_widget_get_ancestor (widget, GTK_TYPE_TOOLBAR)); g_return_if_fail (toolbar != NULL); - gtk_widget_size_request (widget, &req); - gtk_widget_size_request (GTK_WIDGET (menu), &menu_req); + gtk_widget_get_preferred_size (widget, &req, NULL); + gtk_widget_get_preferred_size (GTK_WIDGET (menu), &menu_req, NULL); screen = gtk_widget_get_screen (GTK_WIDGET (menu)); window = gtk_widget_get_window (widget); diff --git a/src/ephy-fullscreen-popup.c b/src/ephy-fullscreen-popup.c index 8cefbefc3..af1024928 100644 --- a/src/ephy-fullscreen-popup.c +++ b/src/ephy-fullscreen-popup.c @@ -121,7 +121,7 @@ ephy_fullscreen_popup_update_position (EphyFullscreenPopup *popup) GdkRectangle screen_rect; int popup_width; - gtk_widget_size_request (widget, &requisition); + gtk_widget_get_preferred_size (widget, &requisition, NULL); popup_width = requisition.width; screen = gtk_widget_get_screen (widget); |