]> spindle.queued.net Git - midori/commitdiff
Position the location completion correctly
authorChristian Dywan <christian@twotoasts.de>
Fri, 28 Oct 2011 21:03:24 +0000 (23:03 +0200)
committerChristian Dywan <christian@twotoasts.de>
Fri, 28 Oct 2011 21:03:24 +0000 (23:03 +0200)
Fixes: https://bugs.launchpad.net/midori/+bug/883143
midori/midori-locationaction.c

index 5d9b6ee881aa15cbfddb7a21b448ec32c4a03e41..ee2d0d3b5485626d8d42818b0ccdd662a6a438a5 100644 (file)
@@ -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);