]> www.fi.muni.cz Git - evince.git/commitdiff
Give priority to form fields over images when deciding whether a button
authorCarlos Garcia Campos <carlosgc@gnome.org>
Sat, 29 Sep 2007 14:38:33 +0000 (14:38 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Sat, 29 Sep 2007 14:38:33 +0000 (14:38 +0000)
2007-09-29  Carlos Garcia Campos  <carlosgc@gnome.org>
* shell/ev-view.c: (ev_view_button_press_event):
Give priority to form fields over images when deciding whether a
button press event is over an image or form field. It allows edit
form fields when they are over a background image. Fixes bug
#477841.

svn path=/trunk/; revision=2689

ChangeLog
shell/ev-view.c

index 3ac861032ff4042da401e4034db9633f8793d818..2e914172f88d4bff261e7c5a5e25a89f48c74995 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2007-09-29  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * shell/ev-view.c: (ev_view_button_press_event):
+
+       Give priority to form fields over images when deciding whether a
+       button press event is over an image or form field. It allows edit
+       form fields when they are over a background image. Fixes bug
+       #477841.
+       
 2007-09-17  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
 
        * NEWS:
index 761594a53f3c16452b1aec4cbc9e91ea231fddb2..ed55a110b78c8a8dd6c6ceee11dee081b5a094b9 100644 (file)
@@ -2659,6 +2659,9 @@ ev_view_button_press_event (GtkWidget      *widget,
                                }
 
                                gtk_widget_queue_draw (widget);
+                       } else if ((field = ev_view_get_form_field_at_location (view, event->x, event->y))) {
+                               ev_view_remove_all (view);
+                               ev_view_handle_form_field (view, field, event->x, event->y);
                        } else if (!location_in_text (view, event->x + view->scroll_x, event->y + view->scroll_y) &&
                                   (image = ev_view_get_image_at_location (view, event->x, event->y))) {
                                if (view->image_dnd_info.image)
@@ -2668,9 +2671,6 @@ ev_view_button_press_event (GtkWidget      *widget,
 
                                view->image_dnd_info.start.x = event->x + view->scroll_x;
                                view->image_dnd_info.start.y = event->y + view->scroll_y;
-                       } else if ((field = ev_view_get_form_field_at_location (view, event->x, event->y))) {
-                               ev_view_remove_all (view);
-                               ev_view_handle_form_field (view, field, event->x, event->y);
                        } else {
                                ev_view_remove_all (view);