From: Ben Pfaff Date: Tue, 30 Jul 2013 05:55:18 +0000 (-0700) Subject: gtkxpaned: Avoid deprecated gtk_widget_get_pointer(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7bf0c4d57ce0da1ad3fe082a01716808eaef09a5;p=pspp gtkxpaned: Avoid deprecated gtk_widget_get_pointer(). --- diff --git a/lib/gtk-contrib/gtkxpaned.c b/lib/gtk-contrib/gtkxpaned.c index 29f5b4dc16..8bd5253dea 100644 --- a/lib/gtk-contrib/gtkxpaned.c +++ b/lib/gtk-contrib/gtkxpaned.c @@ -1468,12 +1468,18 @@ static void update_drag (GtkXPaned * xpaned) { GdkPoint pos; + GtkWidget *widget = GTK_WIDGET (xpaned); gint handle_size; GtkRequisition size; GtkAllocation allocation; - gtk_widget_get_allocation (GTK_WIDGET (xpaned), &allocation); - gtk_widget_get_pointer (GTK_WIDGET (xpaned), &pos.x, &pos.y); + gtk_widget_get_allocation (widget, &allocation); + + gdk_window_get_device_position (gtk_widget_get_window (widget), + gdk_device_manager_get_client_pointer ( + gdk_display_get_device_manager ( + gtk_widget_get_display (widget))), + &pos.x, &pos.y, NULL); if (xpaned->in_drag_vert) { @@ -1481,8 +1487,7 @@ update_drag (GtkXPaned * xpaned) if (is_rtl (xpaned)) { - gtk_widget_style_get (GTK_WIDGET (xpaned), - "handle-size", &handle_size, NULL); + gtk_widget_style_get (widget, "handle-size", &handle_size, NULL); size.height = allocation.height - pos.y - handle_size; } @@ -1506,8 +1511,7 @@ update_drag (GtkXPaned * xpaned) if (is_rtl (xpaned)) { - gtk_widget_style_get (GTK_WIDGET (xpaned), - "handle-size", &handle_size, NULL); + gtk_widget_style_get (widget, "handle-size", &handle_size, NULL); size.width = allocation.width - pos.x - handle_size; } @@ -1532,8 +1536,7 @@ update_drag (GtkXPaned * xpaned) if (is_rtl (xpaned)) { - gtk_widget_style_get (GTK_WIDGET (xpaned), - "handle-size", &handle_size, NULL); + gtk_widget_style_get (widget, "handle-size", &handle_size, NULL); size.width = allocation.width - pos.x - handle_size; size.height = allocation.height - pos.y - handle_size;