[Xfce4-commits] <midori:master> Position the location completion correctly

Christian Dywan noreply at xfce.org
Fri Oct 28 23:08:01 CEST 2011


Updating branch refs/heads/master
         to f6d3c29be5297b81f5d9f385d6290bcddbf6bc24 (commit)
       from be04be83034e0ac0125f75b7122a2d57430b053d (commit)

commit f6d3c29be5297b81f5d9f385d6290bcddbf6bc24
Author: Christian Dywan <christian at twotoasts.de>
Date:   Fri Oct 28 23:03:24 2011 +0200

    Position the location completion correctly
    
    Fixes: https://bugs.launchpad.net/midori/+bug/883143

 midori/midori-locationaction.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/midori/midori-locationaction.c b/midori/midori-locationaction.c
index 5d9b6ee..ee2d0d3 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);
 


More information about the Xfce4-commits mailing list