]> www.fi.muni.cz Git - evince.git/commitdiff
Make sure the cursor is correctly restored after showing the right click
authorCarlos Garcia Campos <carlosgc@gnome.org>
Fri, 5 Sep 2008 16:52:36 +0000 (16:52 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Fri, 5 Sep 2008 16:52:36 +0000 (16:52 +0000)
2008-09-05  Carlos Garcia Campos  <carlosgc@gnome.org>

* shell/ev-view.c: (ev_view_motion_notify_event):

Make sure the cursor is correctly restored after showing the right
click menu.

svn path=/trunk/; revision=3154

ChangeLog
shell/ev-view.c

index 3d8d186480855e0c62adaa6ffc2a9e43b93ee853..76004782479691987ed858a220c0aa440022e52a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-09-05  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * shell/ev-view.c: (ev_view_motion_notify_event):
+
+       Make sure the cursor is correctly restored after showing the right
+       click menu.
+       
 2008-09-05  Carlos Garcia Campos  <carlosgc@gnome.org>
 
        * libdocument/ev-attachment.[ch]: (ev_attachment_launch_app),
index 750ee5e4d3c5c5b26a2a92500914329b1edf1d76..da895804da8da4bfbc5bbdaea4354a0463c11a79 100644 (file)
@@ -3038,15 +3038,20 @@ ev_view_motion_notify_event (GtkWidget      *widget,
                }
        }
        
-       /* For the Evince 0.4.x release, we limit selection to un-rotated
-        * documents only.
-        */
-       if (view->pressed_button == 1 && view->rotation == 0) {
+       switch (view->pressed_button) {
+       case 1:
+               /* For the Evince 0.4.x release, we limit selection to un-rotated
+                * documents only.
+                */
+               if (view->rotation != 0)
+                       return FALSE;
 
                /* Schedule timeout to scroll during selection and additionally 
                 * scroll once to allow arbitrary speed. */
                if (!view->selection_scroll_id)
-                   view->selection_scroll_id = g_timeout_add (SCROLL_TIME, (GSourceFunc)selection_scroll_timeout_cb, view);
+                   view->selection_scroll_id = g_timeout_add (SCROLL_TIME,
+                                                              (GSourceFunc)selection_scroll_timeout_cb,
+                                                              view);
                else 
                    selection_scroll_timeout_cb (view);
 
@@ -3063,7 +3068,7 @@ ev_view_motion_notify_event (GtkWidget      *widget,
                        view->selection_update_id = g_idle_add ((GSourceFunc)selection_update_idle_cb, view);
 
                return TRUE;
-       } else if (view->pressed_button == 2) {
+       case 2:
                if (!view->drag_info.in_drag) {
                        gboolean start;
                        int i;
@@ -3113,10 +3118,11 @@ ev_view_motion_notify_event (GtkWidget      *widget,
 
                        return TRUE;
                }
-       } else if (view->pressed_button <= 0) {
+
+               break;
+       default:
                ev_view_handle_cursor_over_xy (view, x, y);
-               return TRUE;
-       }
+       } 
 
        return FALSE;
 }