2005-01-23 Stephane LOEUILLET <stephane.loeuillet@tiscali.fr>
+ * pdf/xpdf/pdf-document.cc (pdf_document_search_page_changed):
+ ignore page offset here, to make search results independent of it,
+
+ * shell/ev-view.c (expose_bin_window): but take offsets into
+ account here. Bug #164932
+
* pdf/xpdf/pdf-document.cc (pdf_document_get_link): divide by
scale at the right time. Bug #164996
&xMin, &yMin, &xMax, &yMax)) {
result.page_num = pdf_document->page;
- result.highlight_area.x = xMin + pdf_document->page_x_offset;
- result.highlight_area.y = yMin + pdf_document->page_y_offset;
+ result.highlight_area.x = xMin;
+ result.highlight_area.y = yMin;
result.highlight_area.width = xMax - xMin;
result.highlight_area.height = yMax - yMin;
result.page_num = pdf_document->page;
- result.highlight_area.x = xMin + pdf_document->page_x_offset;
- result.highlight_area.y = yMin + pdf_document->page_y_offset;
+ result.highlight_area.x = xMin;
+ result.highlight_area.y = yMin;
result.highlight_area.width = xMax - xMin;
result.highlight_area.height = yMax - yMin;
results[i].highlight_area.width,
results[i].highlight_area.height);
#endif
- if (results[i].page_num == current_page)
+ if (results[i].page_num == current_page) {
+ GdkRectangle highlight_area_fixed;
+ highlight_area_fixed.x = results[i].highlight_area.x + x_offset + 1;
+ highlight_area_fixed.y = results[i].highlight_area.y + y_offset + 1;
+ highlight_area_fixed.width = results[i].highlight_area.width;
+ highlight_area_fixed.height = results[i].highlight_area.height;
+
draw_rubberband (widget, view->bin_window,
- &results[i].highlight_area);
+ &highlight_area_fixed);
+ }
++i;
}