+2005-01-21 Marco Pesenti Gritti <marco@gnome.org>
+
+ * shell/ev-view.c: (ev_view_button_press_event),
+ (ev_view_motion_notify_event):
+
+ Make selection work in any direction
+
2005-01-21 Marco Pesenti Gritti <marco@gnome.org>
* TODO:
gboolean pressed_button;
gboolean has_selection;
+ GdkPoint selection_start;
GdkRectangle selection;
EvViewCursor cursor;
gtk_widget_queue_draw (widget);
}
- view->selection.x = event->x;
- view->selection.y = event->y;
- view->selection.width = 0;
- view->selection.height = 0;
+ view->selection_start.x = event->x;
+ view->selection_start.y = event->y;
break;
}
if (view->pressed_button > 0) {
view->has_selection = TRUE;
- view->selection.x = MIN (view->selection.x, event->x);
- view->selection.y = MIN (view->selection.y, event->y);
- view->selection.width = ABS (view->selection.x - event->x) + 1;
- view->selection.height = ABS (view->selection.y - event->y) + 1;
+ view->selection.x = MIN (view->selection_start.x, event->x);
+ view->selection.y = MIN (view->selection_start.y, event->y);
+ view->selection.width = ABS (view->selection_start.x - event->x) + 1;
+ view->selection.height = ABS (view->selection_start.y - event->y) + 1;
} else if (view->document) {
EvLink *link;