Index: gtk/gtktextview.c
===================================================================
diff -Nup gtk/.svn/text-base/gtktextview.c.svn-base gtktextview.c
--- gtk/gtktextview.c	(revision 17268)
+++ gtk/gtktextview.c	(working copy)
@@ -4170,10 +4170,10 @@ gtk_text_view_motion_event (GtkWidget *w
   if (event->window == text_view->text_window->bin_window &&
       text_view->drag_start_x >= 0)
     {
-      gint x, y;
+      gint x = event->x;
+      gint y = event->y;
 
-      gdk_window_get_pointer (text_view->text_window->bin_window,
-                              &x, &y, NULL);
+      gdk_event_request_motions (event);
 
       if (gtk_drag_check_threshold (widget,
 				    text_view->drag_start_x, 
Index: gtk/gtkspinbutton.c
===================================================================
diff -Nup gtk/.svn/text-base/gtkspinbutton.c.svn-base gtkspinbutton.c
--- gtk/gtkspinbutton.c	(revision 17268)
+++ gtk/gtkspinbutton.c	(working copy)
@@ -1148,9 +1148,9 @@ gtk_spin_button_motion_notify (GtkWidget
 
   if (event->window == spin->panel)
     {
-      gint y;
-      
-      gdk_window_get_pointer (spin->panel, NULL, &y, NULL);
+      gint y = event->y;
+
+      gdk_event_request_motions (event);
   
       if (y <= widget->requisition.height / 2 && 
 	  spin->in_child == GTK_ARROW_DOWN)
Index: gtk/gtkaboutdialog.c
===================================================================
diff -Nup gtk/.svn/text-base/gtkaboutdialog.c.svn-base gtkaboutdialog.c
--- gtk/gtkaboutdialog.c	(revision 17268)
+++ gtk/gtkaboutdialog.c	(working copy)
@@ -1781,7 +1781,7 @@ credits_motion_notify_event (GtkWidget *
 
   set_cursor_if_appropriate (about, GTK_TEXT_VIEW (text_view), x, y);
 
-  gdk_window_get_pointer (text_view->window, NULL, NULL, NULL);
+  gdk_event_request_motions (event);
 
   return FALSE;
 }
Index: gtk/gtkhsv.c
===================================================================
diff -Nup gtk/.svn/text-base/gtkhsv.c.svn-base gtkhsv.c
--- gtk/gtkhsv.c	(revision 17268)
+++ gtk/gtkhsv.c	(working copy)
@@ -851,18 +851,11 @@ gtk_hsv_motion (GtkWidget      *widget,
   if (priv->mode == DRAG_NONE)
     return FALSE;
   
-  if (event->is_hint)
-    {
-      gdk_window_get_pointer (priv->window, &ix, &iy, &mods);
-      x = ix;
-      y = iy;
-    }
-  else
-    {
-      x = event->x;
-      y = event->y;
-    }
-  
+  gdk_event_request_motions (event);
+  x = event->x;
+  y = event->y;
+  mods = event->state;
+
   if (priv->mode == DRAG_H)
     {
       gtk_hsv_set_color (hsv, compute_v (hsv, x, y), priv->s, priv->v);
Index: gtk/gtkhruler.c
===================================================================
diff -Nup gtk/.svn/text-base/gtkhruler.c.svn-base gtkhruler.c
--- gtk/gtkhruler.c	(revision 17268)
+++ gtk/gtkhruler.c	(working copy)
@@ -89,10 +89,8 @@ gtk_hruler_motion_notify (GtkWidget     
 
   ruler = GTK_RULER (widget);
 
-  if (event->is_hint)
-    gdk_window_get_pointer (widget->window, &x, NULL, NULL);
-  else
-    x = event->x;
+  gdk_event_request_motions (event);
+  x = event->x;
 
   ruler->position = ruler->lower + ((ruler->upper - ruler->lower) * x) / widget->allocation.width;
   g_object_notify (G_OBJECT (ruler), "position");
Index: gtk/gtkvruler.c
===================================================================
diff -Nup gtk/.svn/text-base/gtkvruler.c.svn-base gtkvruler.c
--- gtk/gtkvruler.c	(revision 17268)
+++ gtk/gtkvruler.c	(working copy)
@@ -90,10 +90,8 @@ gtk_vruler_motion_notify (GtkWidget     
 
   ruler = GTK_RULER (widget);
 
-  if (event->is_hint)
-    gdk_window_get_pointer (widget->window, NULL, &y, NULL);
-  else
-    y = event->y;
+  gdk_event_request_motions (event);
+  y = event->y;
 
   ruler->position = ruler->lower + ((ruler->upper - ruler->lower) * y) / widget->allocation.height;
   g_object_notify (G_OBJECT (ruler), "position");
Index: gtk/gtkentry.c
===================================================================
diff -Nup gtk/.svn/text-base/gtkentry.c.svn-base gtkentry.c
--- gtk/gtkentry.c	(revision 17268)
+++ gtk/gtkentry.c	(working copy)
@@ -1872,8 +1872,8 @@ gtk_entry_motion_notify (GtkWidget      
   if (entry->select_lines)
     return TRUE;
 
-  if (event->is_hint || (entry->text_area != event->window))
-    gdk_window_get_pointer (entry->text_area, NULL, NULL, NULL);
+  if (entry->text_area != event->window)
+    gdk_event_request_motions (event);
 
   if (entry->in_drag)
     {
Index: gtk/gtktooltip.c
===================================================================
diff -Nup gtk/.svn/text-base/gtktooltip.c.svn-base gtk/gtktooltip.c
--- gtk/gtktooltip.c	(revision 17268)
+++ gtk/gtktooltip.c	(working copy)
@@ -997,8 +997,7 @@ _gtk_tooltip_handle_event (GdkEvent *eve
     }
 
   /* Always poll for a next motion event */
-  if (event->type == GDK_MOTION_NOTIFY && event->motion.is_hint)
-    gdk_window_get_pointer (event->any.window, NULL, NULL, NULL);
+  gdk_event_request_motions (&event->motion);
 
   /* Hide the tooltip when there's no new tooltip widget */
   if (!has_tooltip_widget)
Index: ChangeLog
===================================================================
diff -Nup .svn/text-base/ChangeLog.svn-base ChangeLog
--- ChangeLog	(revision 17268)
+++ ChangeLog	(working copy)
@@ -1,3 +1,17 @@
+Tue Feb  6 15:53:59 2007  Tim Janik  <timj@imendio.com>
+
+	* gtk/gtktextview.c (gtk_text_view_motion_event):
+	* gtk/gtkspinbutton.c (gtk_spin_button_motion_notify):
+	* gtk/gtkaboutdialog.c (credits_motion_notify_event):
+	* gtk/gtkhruler.c (gtk_hruler_motion_notify):
+	* gtk/gtkvruler.c (gtk_vruler_motion_notify): 
+	* gtk/gtkentry.c (gtk_entry_motion_notify):
+	* gtk/gtktooltip.c (_gtk_tooltip_handle_event):
+	* gtk/gtkhsv.c (gtk_hsv_motion): call gdk_event_request_motions()                              
+	for new motion events after receiving motion hints.
+
+	* gdk/gdkevents.[hc]: added gdk_event_request_motions().
+
 2007-02-06  Kristian Rietveld  <kris@imendio.com>
 
 	* gtk/gtktooltip.c (find_topmost_widget_coords_from_event):
Index: gdk/gdkevents.c
===================================================================
diff -Nup gdk/.svn/text-base/gdkevents.c.svn-base gdkevents.c
--- gdk/gdkevents.c	(revision 17268)
+++ gdk/gdkevents.c	(working copy)
@@ -835,6 +835,26 @@ gdk_event_get_axis (GdkEvent   *event,
 }
 
 /**
+ * gdk_event_request_motions:
+ * @event: a valid #GdkEvent
+ *
+ * Request more motion notifies if #event is a motion notify hint event.
+ * This funciton should be used instead of gdk_window_get_pointer() to
+ * request further motion notifies, because it also works for extension
+ * events where motion notifies are provided for devices other than the
+ * core pointer.
+ *
+ * Since: 2.12
+ **/
+void
+gdk_event_request_motions (GdkEventMotion *event)
+{
+  g_return_if_fail (event != NULL);
+  if (event->type == GDK_MOTION_NOTIFY && event->is_hint)
+    gdk_device_get_state (event->device, event->window, NULL, NULL);
+}
+
+/**
  * gdk_event_set_screen:
  * @event: a #GdkEvent
  * @screen: a #GdkScreen
Index: gdk/gdkevents.h
===================================================================
diff -Nup gdk/.svn/text-base/gdkevents.h.svn-base gdkevents.h
--- gdk/gdkevents.h	(revision 17268)
+++ gdk/gdkevents.h	(working copy)
@@ -529,6 +529,7 @@ gboolean  gdk_event_get_root_coords	(Gdk
 gboolean  gdk_event_get_axis            (GdkEvent        *event,
                                          GdkAxisUse       axis_use,
                                          gdouble         *value);
+void      gdk_event_request_motions     (GdkEventMotion  *event);
 void	  gdk_event_handler_set 	(GdkEventFunc    func,
 					 gpointer        data,
 					 GDestroyNotify  notify);
