[gtksourceview/wip/chergert/gsv-gtk4: 192/192] completion: use dx to specify offset




commit 5921e6fe9336c8752eed8abf2642a4c15fee2583
Author: Christian Hergert <chergert redhat com>
Date:   Fri Aug 7 11:27:29 2020 -0700

    completion: use dx to specify offset

 gtksourceview/gtksourcecompletioninfo.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gtksourceview/gtksourcecompletioninfo.c b/gtksourceview/gtksourcecompletioninfo.c
index cbb1df1f6..fc05baa46 100644
--- a/gtksourceview/gtksourcecompletioninfo.c
+++ b/gtksourceview/gtksourcecompletioninfo.c
@@ -226,7 +226,7 @@ move_to_iter (GtkSourceCompletionInfo *window,
 
        gtk_widget_translate_coordinates (GTK_WIDGET (view),
                                          GTK_WIDGET (root),
-                                         location.x + window->xoffset,
+                                         location.x,
                                          location.y,
                                          &x,
                                          &y);
@@ -236,7 +236,8 @@ move_to_iter (GtkSourceCompletionInfo *window,
 
        layout = gdk_popup_layout_new (&location, GDK_GRAVITY_SOUTH_WEST, GDK_GRAVITY_NORTH_WEST);
        gdk_popup_layout_set_anchor_hints (layout, GDK_ANCHOR_SLIDE | GDK_ANCHOR_FLIP_Y | GDK_ANCHOR_RESIZE);
-       gdk_popup_present (GDK_POPUP (surface), window->priv->xoffset, 0, layout);
+       gdk_popup_layout_set_offset (layout, window->xoffset, 0);
+       gdk_popup_present (GDK_POPUP (surface), 0, 0, layout);
        gdk_popup_layout_unref (layout);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]