From f6d3c29be5297b81f5d9f385d6290bcddbf6bc24 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Fri, 28 Oct 2011 23:03:24 +0200 Subject: [PATCH] Position the location completion correctly Fixes: https://bugs.launchpad.net/midori/+bug/883143 --- midori/midori-locationaction.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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); -- 2.39.5