mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
Bug 495320 - GtkRange does not use gdk_event_request_motions
2009-02-25 Xan Lopez <xan@gnome.org> Bug 495320 - GtkRange does not use gdk_event_request_motions * gtk/gtkrange.c: (gtk_range_motion_notify): Use gdk_event_request_motions to request more motion events, as suggested in the docs for widgets using motion hints. svn path=/trunk/; revision=22407
This commit is contained in:
parent
4708c01a20
commit
7871e09560
@ -1,3 +1,12 @@
|
||||
2009-02-25 Xan Lopez <xan@gnome.org>
|
||||
|
||||
Bug 495320 - GtkRange does not use gdk_event_request_motions
|
||||
|
||||
* gtk/gtkrange.c:
|
||||
(gtk_range_motion_notify): Use gdk_event_request_motions to
|
||||
request more motion events, as suggested in the docs for widgets
|
||||
using motion hints.
|
||||
|
||||
2009-02-24 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk/x11/gdkevents-x11.c:
|
||||
|
@ -2280,20 +2280,19 @@ gtk_range_motion_notify (GtkWidget *widget,
|
||||
GdkEventMotion *event)
|
||||
{
|
||||
GtkRange *range;
|
||||
gint x, y;
|
||||
|
||||
range = GTK_RANGE (widget);
|
||||
|
||||
gdk_window_get_pointer (range->event_window, &x, &y, NULL);
|
||||
gdk_event_request_motions (event);
|
||||
|
||||
range->layout->mouse_x = x;
|
||||
range->layout->mouse_y = y;
|
||||
range->layout->mouse_x = event->x;
|
||||
range->layout->mouse_y = event->y;
|
||||
|
||||
if (gtk_range_update_mouse_location (range))
|
||||
gtk_widget_queue_draw (widget);
|
||||
|
||||
if (range->layout->grab_location == MOUSE_SLIDER)
|
||||
update_slider_position (range, x, y);
|
||||
update_slider_position (range, event->x, event->y);
|
||||
|
||||
/* We handled the event if the mouse was in the range_rect */
|
||||
return range->layout->mouse_location != MOUSE_OUTSIDE;
|
||||
|
Loading…
Reference in New Issue
Block a user