[evince] ev-page-accessible: Fix erroneous cast



commit 301c2b50d1fa5eab4240d193ef1ed11822474264
Author: Samuel Thibault <samuel thibault ens-lyon org>
Date:   Thu Aug 29 15:48:05 2019 +0200

    ev-page-accessible: Fix erroneous cast
    
    ev_page_accessible_get_offset_at_point emits
    
       invalid cast from 'EvPageAccessible' to 'GtkWidget'
    
    and alike. self is indeed not a GtkWidget, view is.
    
    Fixes GNOME/orca#54

 libview/ev-page-accessible.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libview/ev-page-accessible.c b/libview/ev-page-accessible.c
index 9d8e2c4b..455a0bf4 100644
--- a/libview/ev-page-accessible.c
+++ b/libview/ev-page-accessible.c
@@ -961,8 +961,8 @@ ev_page_accessible_get_offset_at_point (AtkText      *text,
 
        view_point.x = x;
        view_point.y = y;
-       toplevel = gtk_widget_get_toplevel (GTK_WIDGET (self));
-       gtk_widget_translate_coordinates (GTK_WIDGET (self), toplevel, 0, 0, &x_widget, &y_widget);
+       toplevel = gtk_widget_get_toplevel (GTK_WIDGET (view));
+       gtk_widget_translate_coordinates (GTK_WIDGET (view), toplevel, 0, 0, &x_widget, &y_widget);
        view_point.x -= x_widget;
        view_point.y -= y_widget;
 


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