[gtk+/xi2] GtkSpinButton: Use device-aware API.



commit 37e7e4e7e152ae3f78abcb715eeb06509a56908b
Author: Carlos Garnacho <carlos gnome org>
Date:   Fri Dec 11 02:51:20 2009 +0100

    GtkSpinButton: Use device-aware API.
    
    This widget needs improvements though, there seems to be a single GdkWindow for
    both buttons, and the code is just prepared for having one button prelighted,
    although of course just one can be clicked at a time.

 gtk/gtkspinbutton.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index a61ea84..589f047 100644
--- a/gtk/gtkspinbutton.c
+++ b/gtk/gtkspinbutton.c
@@ -906,7 +906,7 @@ gtk_spin_button_enter_notify (GtkWidget        *widget,
       gint x;
       gint y;
 
-      gdk_window_get_pointer (spin->panel, &x, &y, NULL);
+      gdk_window_get_device_position (spin->panel, event->device, &x, &y, NULL);
 
       if (y <= widget->requisition.height / 2)
 	spin->in_child = GTK_ARROW_UP;
@@ -915,7 +915,7 @@ gtk_spin_button_enter_notify (GtkWidget        *widget,
 
       gtk_widget_queue_draw (GTK_WIDGET (spin));
     }
- 
+
   if (GTK_WIDGET_CLASS (gtk_spin_button_parent_class)->enter_notify_event)
     return GTK_WIDGET_CLASS (gtk_spin_button_parent_class)->enter_notify_event (widget, event);
 



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