mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 21:36:00 +01:00
Fix fence post error in page-widget's redraw_rect()
A rectangle whose horizontal coordinates are x1 on the left and x2 on the right is (x2 + 1) - x1 pixels wide, not x2 - x1. This error caused the search result highlighting to leave a one-pixel-wide border behind, on the right and bottom side of the result. See issue 242 <http://bugs.pwmt.org/issue242>. Reported-by: Abdó Roig <abdo.roig@gmail.com> Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
parent
006724bc75
commit
8f50bf5ea0
1 changed files with 2 additions and 2 deletions
|
@ -506,8 +506,8 @@ redraw_rect(ZathuraPage* widget, zathura_rectangle_t* rectangle)
|
|||
GdkRectangle grect;
|
||||
grect.x = rectangle->x1;
|
||||
grect.y = rectangle->y1;
|
||||
grect.width = rectangle->x2 - rectangle->x1;
|
||||
grect.height = rectangle->y2 - rectangle->y1;
|
||||
grect.width = (rectangle->x2 + 1) - rectangle->x1;
|
||||
grect.height = (rectangle->y2 + 1) - rectangle->y1;
|
||||
#if (GTK_MAJOR_VERSION == 3)
|
||||
gtk_widget_queue_draw_area(GTK_WIDGET(widget), grect.x, grect.y, grect.width, grect.height);
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue