Position the location completion correctly

Fixes: https://bugs.launchpad.net/midori/+bug/883143
This commit is contained in:
Christian Dywan 2011-10-28 23:03:24 +02:00
parent be04be8303
commit f6d3c29be5

View file

@ -291,6 +291,15 @@ midori_location_action_popup_position (GtkWidget* popup,
GtkAllocation allocation; GtkAllocation allocation;
gdk_window_get_origin (window, &wx, &wy); gdk_window_get_origin (window, &wx, &wy);
if (!gtk_widget_get_has_window (widget))
{
GtkAllocation alloc;
gtk_widget_get_allocation (widget, &alloc);
wx += alloc.x;
wy += alloc.y;
}
gtk_widget_size_request (popup, &menu_req); gtk_widget_size_request (popup, &menu_req);
gtk_widget_size_request (widget, &widget_req); gtk_widget_size_request (widget, &widget_req);