]> www.fi.muni.cz Git - evince.git/commitdiff
Do not create the idle function for kinetic scrolling if we are not in a
authorCarlos Garcia Campos <carlosgc@gnome.org>
Tue, 22 Jan 2008 18:43:39 +0000 (18:43 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Tue, 22 Jan 2008 18:43:39 +0000 (18:43 +0000)
2008-01-22  Carlos Garcia Campos  <carlosgc@gnome.org>
* shell/ev-view.c: (ev_view_button_release_event):
Do not create the idle function for kinetic scrolling if we are
not in a drag operation.

svn path=/trunk/; revision=2840

ChangeLog
shell/ev-view.c

index 66aba098ddbf77010692856e20f7f0dd39cde514..4038a8658acdccc48440bd095ca7c306967ab7cb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-01-22  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * shell/ev-view.c: (ev_view_button_release_event):
+
+       Do not create the idle function for kinetic scrolling if we are
+       not in a drag operation.
+       
 2008-01-22  Carlos Garcia Campos  <carlosgc@gnome.org>
 
        * shell/ev-view.c: (ev_view_handle_cursor_over_xy),
index 28a21393b7ba3c4738815a8a097aa8bed5453a03..286350678557723b4d2c51367f53ec406b3c3f87 100644 (file)
@@ -3132,7 +3132,6 @@ ev_view_button_release_event (GtkWidget      *widget,
        EvView *view = EV_VIEW (widget);
        EvLink *link = NULL;
 
-       view->drag_info.in_drag = FALSE;
        view->image_dnd_info.in_drag = FALSE;
 
        if (view->scroll_info.autoscrolling) {
@@ -3146,17 +3145,22 @@ ev_view_button_release_event (GtkWidget      *widget,
 
                return TRUE;
        } 
-       
-       view->drag_info.release_timeout_id = g_timeout_add (20,
-                       (GSourceFunc)ev_view_scroll_drag_release, view);
 
-       if (view->pressed_button == 2) {
-               ev_view_handle_cursor_over_xy (view, event->x, event->y);
+       if (view->drag_info.in_drag) {
+               view->drag_info.release_timeout_id =
+                       g_timeout_add (20,
+                                      (GSourceFunc)ev_view_scroll_drag_release, view);
        }
 
-       if (view->document && view->pressed_button != 3) {
+       if (view->document && !view->drag_info.in_drag && view->pressed_button != 3) {
                link = ev_view_get_link_at_location (view, event->x, event->y);
        }
+       
+       view->drag_info.in_drag = FALSE;
+
+       if (view->pressed_button == 2) {
+               ev_view_handle_cursor_over_xy (view, event->x, event->y);
+       }
 
        view->pressed_button = -1;