From a907096a990015010ec1171cd8997d33951f28a2 Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Tue, 12 Apr 2016 11:35:15 +0100 Subject: Hackfest 2016: un-obfuscate the SPCanvas widget. (bzr r14790) --- src/ui/interface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ui/interface.cpp') diff --git a/src/ui/interface.cpp b/src/ui/interface.cpp index 531aa728d..8639861f8 100644 --- a/src/ui/interface.cpp +++ b/src/ui/interface.cpp @@ -1018,7 +1018,7 @@ sp_ui_drag_data_received(GtkWidget *widget, { int destX = 0; int destY = 0; - gtk_widget_translate_coordinates( widget, &(desktop->canvas->widget), x, y, &destX, &destY ); + gtk_widget_translate_coordinates( widget, GTK_WIDGET(desktop->canvas), x, y, &destX, &destY ); Geom::Point where( sp_canvas_window_to_world( desktop->canvas, Geom::Point( destX, destY ) ) ); Geom::Point const button_dt(desktop->w2d(where)); Geom::Point const button_doc(desktop->dt2doc(button_dt)); @@ -1141,7 +1141,7 @@ sp_ui_drag_data_received(GtkWidget *widget, if ( worked ) { int destX = 0; int destY = 0; - gtk_widget_translate_coordinates( widget, &(desktop->canvas->widget), x, y, &destX, &destY ); + gtk_widget_translate_coordinates( widget, GTK_WIDGET(desktop->canvas), x, y, &destX, &destY ); Geom::Point where( sp_canvas_window_to_world( desktop->canvas, Geom::Point( destX, destY ) ) ); Geom::Point const button_dt(desktop->w2d(where)); Geom::Point const button_doc(desktop->dt2doc(button_dt)); -- cgit v1.2.3