From: Christian Dywan Date: Fri, 28 Oct 2011 21:03:24 +0000 (+0200) Subject: Position the location completion correctly X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6d3c29be5297b81f5d9f385d6290bcddbf6bc24;p=midori Position the location completion correctly Fixes: https://bugs.launchpad.net/midori/+bug/883143 --- diff --git a/midori/midori-locationaction.c b/midori/midori-locationaction.c index 5d9b6ee8..ee2d0d3b 100644 --- a/midori/midori-locationaction.c +++ b/midori/midori-locationaction.c @@ -291,6 +291,15 @@ midori_location_action_popup_position (GtkWidget* popup, GtkAllocation allocation; 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 (widget, &widget_req);