Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/ev-view.c
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2008-01-22 18:43:39 (GMT)
committer Carlos Garcia Campos <carlosgc@src.gnome.org>2008-01-22 18:43:39 (GMT)
commita6fd058a015e4b95fd2f12c1c6a2ecadde65f6d8 (patch)
treedec0d21c4f929a7b323c76f6b9b12be1470a3594 /shell/ev-view.c
parent27933bd8ac338f3735413bd142a6f90d91e03b6d (diff)
Do not create the idle function for kinetic scrolling if we are not in a
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
Diffstat (limited to 'shell/ev-view.c')
-rw-r--r--shell/ev-view.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/shell/ev-view.c b/shell/ev-view.c
index 28a2139..2863506 100644
--- a/shell/ev-view.c
+++ b/shell/ev-view.c
@@ -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;