[gnumeric: 1/2] Replace deprecated gdk_window_get_pointer



commit 076f06d8cc0c1275f80a49945ce15cdbb4833517
Author: Valek Filippov <frob df ru>
Date:   Fri Dec 28 00:14:22 2012 -0500

    Replace deprecated gdk_window_get_pointer

 ChangeLog               |    4 ++++
 src/gnm-pane.c          |   10 +++++++---
 src/sheet-control-gui.c |    5 ++++-
 3 files changed, 15 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 60f1383..52f04b1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-12-28  Valek Filippov  <frob df ru>
+
+	* gnm-pane.c, shell-control-gui.c (gdk_window_get_pointer): Replaced depricated call.
+
 2012-12-27  Morten Welinder  <terra gnome org>
 
 	* src/ssdiff.c (diff_sheets): Compare styles too.
diff --git a/src/gnm-pane.c b/src/gnm-pane.c
index ee43ba8..a1b478e 100644
--- a/src/gnm-pane.c
+++ b/src/gnm-pane.c
@@ -1074,6 +1074,7 @@ cb_pane_drag_motion (GtkWidget *widget, GdkDragContext *context,
 		/* same scg */
 		GocCanvas *canvas = GOC_CANVAS (widget);
 		GdkModifierType mask;
+		GdkWindow *window = gtk_widget_get_parent_window (source_widget);
 		double wx, wy;
 
 		g_object_set_data (G_OBJECT (context),
@@ -1082,7 +1083,8 @@ cb_pane_drag_motion (GtkWidget *widget, GdkDragContext *context,
 		wx *= goc_canvas_get_pixels_per_unit (canvas);
 		wy *= goc_canvas_get_pixels_per_unit (canvas);
 
-		gdk_window_get_pointer (gtk_widget_get_parent_window (source_widget),
+		gdk_window_get_device_position (window,
+			gdk_device_manager_get_client_pointer (gdk_display_get_device_manager (gdk_window_get_display (window))),
 			NULL, NULL, &mask);
 		gnm_pane_objects_drag (GNM_PANE (source_widget), NULL,
 			wx, wy, 8, FALSE, (mask & GDK_SHIFT_MASK) != 0);
@@ -1842,6 +1844,7 @@ cb_obj_autoscroll (GnmPane *pane, GnmPaneSlideInfo const *info)
 {
 	SheetControlGUI *scg = pane->simple.scg;
 	GdkModifierType mask;
+	GdkWindow *window = gtk_widget_get_parent_window (GTK_WIDGET (pane));
 
 	/* Cheesy hack calculate distance we move the screen, this loses the
 	 * mouse position */
@@ -1856,8 +1859,9 @@ cb_obj_autoscroll (GnmPane *pane, GnmPaneSlideInfo const *info)
 #endif
 
 	pane->drag.had_motion = TRUE;
-	gdk_window_get_pointer (gtk_widget_get_parent_window (GTK_WIDGET (pane)),
-				NULL, NULL, &mask);
+	gdk_window_get_device_position (window,
+		gdk_device_manager_get_client_pointer (gdk_display_get_device_manager (gdk_window_get_display (window))),
+		NULL, NULL, &mask);
 	scg_objects_drag (pane->simple.scg, pane,
 			  NULL, &dx, &dy, 8, FALSE, (mask & GDK_SHIFT_MASK) != 0, TRUE);
 
diff --git a/src/sheet-control-gui.c b/src/sheet-control-gui.c
index 3f672c0..ef9f857 100644
--- a/src/sheet-control-gui.c
+++ b/src/sheet-control-gui.c
@@ -3962,7 +3962,10 @@ scg_drag_receive_same_process (SheetControlGUI *scg, GtkWidget *source_widget,
 		gchar *title = NULL;
 
 		window = gtk_widget_get_parent_window (GTK_WIDGET (pane));
-		gdk_window_get_pointer (window, NULL, NULL, &mask);
+		gdk_window_get_device_position (window,
+				gdk_device_manager_get_client_pointer (gdk_display_get_device_manager (gdk_window_get_display (window))),
+				NULL, NULL, &mask);
+
 		make_dup = ((mask & GDK_CONTROL_MASK) != 0);
 
 		/* When copying objects, we have to create a copy of current selection.



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