]> www.fi.muni.cz Git - evince.git/commitdiff
Use always drag mouse cursor during a drag operation. Fixes bug #470564.
authorCarlos Garcia Campos <carlosgc@gnome.org>
Mon, 3 Sep 2007 09:20:41 +0000 (09:20 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Mon, 3 Sep 2007 09:20:41 +0000 (09:20 +0000)
2007-09-03  Carlos Garcia Campos  <carlosgc@gnome.org>
* shell/ev-view.c: (ev_view_handle_cursor_over_xy),
(ev_view_button_release_event), (ev_view_leave_notify_event):
Use always drag mouse cursor during a drag operation. Fixes bug
#470564.

svn path=/trunk/; revision=2653

ChangeLog
shell/ev-view.c

index 09aa23a3ab8a98bf112fb9edb394c48ee7e8924c..9dedb5b900630f7e137376a005cd0926e885b77c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-09-03  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * shell/ev-view.c: (ev_view_handle_cursor_over_xy),
+       (ev_view_button_release_event), (ev_view_leave_notify_event):
+
+       Use always drag mouse cursor during a drag operation. Fixes bug
+       #470564.
+       
 2007-09-02  Carlos Garcia Campos  <carlosgc@gnome.org>
 
        * backend/pdf/ev-poppler.cc: (pdf_selection_get_selected_text),
index cbdffd80d235eb7369ba6a43bfeae682de299fac..60f82e3d8433d3c176897540dcdd73a7d3e945d3 100644 (file)
@@ -1498,6 +1498,12 @@ ev_view_handle_cursor_over_xy (EvView *view, gint x, gint y)
 
        if (view->cursor == EV_VIEW_CURSOR_HIDDEN)
                return;
+
+       if (view->drag_info.in_drag) {
+               if (view->cursor != EV_VIEW_CURSOR_DRAG)
+                       ev_view_set_cursor (view, EV_VIEW_CURSOR_DRAG);
+               return;
+       }
        
        link = ev_view_get_link_at_location (view, x, y);
        
@@ -2981,21 +2987,20 @@ ev_view_button_release_event (GtkWidget      *widget,
                              GdkEventButton *event)
 {
        EvView *view = EV_VIEW (widget);
-       EvLink *link;
+       EvLink *link = NULL;
+
+       view->drag_info.in_drag = FALSE;
+       view->image_dnd_info.in_drag = FALSE;
 
        if (view->pressed_button == 2) {
-               ev_view_set_cursor (view, EV_VIEW_CURSOR_NORMAL);
+               ev_view_handle_cursor_over_xy (view, event->x, event->y);
        }
 
        if (view->document && view->pressed_button != 3) {
                link = ev_view_get_link_at_location (view, event->x, event->y);
-       } else {
-               link = NULL;
        }
 
        view->pressed_button = -1;
-       view->drag_info.in_drag = FALSE;
-       view->image_dnd_info.in_drag = FALSE;
 
        if (view->selection_scroll_id) {
            g_source_remove (view->selection_scroll_id);
@@ -3357,9 +3362,8 @@ static gboolean
 ev_view_leave_notify_event (GtkWidget *widget, GdkEventCrossing   *event)
 {
        EvView *view = EV_VIEW (widget);
-    
-       if (view->cursor == EV_VIEW_CURSOR_LINK ||
-           view->cursor == EV_VIEW_CURSOR_IBEAM)
+
+       if (view->cursor != EV_VIEW_CURSOR_NORMAL)
                ev_view_set_cursor (view, EV_VIEW_CURSOR_NORMAL);
 
 #if !GTK_CHECK_VERSION (2, 11, 7)