Commit 5dacede6 authored by Sebastian Ramacher's avatar Sebastian Ramacher
Browse files

use getter functions to make it compatible with GTK+3

parent f2864279
...@@ -391,7 +391,7 @@ redraw_rect(ZathuraPage* widget, zathura_rectangle_t* rectangle) ...@@ -391,7 +391,7 @@ redraw_rect(ZathuraPage* widget, zathura_rectangle_t* rectangle)
grect.y = rectangle->y1; grect.y = rectangle->y1;
grect.width = rectangle->x2 - rectangle->x1; grect.width = rectangle->x2 - rectangle->x1;
grect.height = rectangle->y2 - rectangle->y1; grect.height = rectangle->y2 - rectangle->y1;
gdk_window_invalidate_rect(GTK_WIDGET(widget)->window, &grect, TRUE); gdk_window_invalidate_rect(gtk_widget_get_parent_window(GTK_WIDGET(widget)), &grect, TRUE);
} }
static void static void
......
...@@ -263,7 +263,8 @@ recalc_rectangle(zathura_page_t* page, zathura_rectangle_t rectangle) ...@@ -263,7 +263,8 @@ recalc_rectangle(zathura_page_t* page, zathura_rectangle_t rectangle)
void void
set_adjustment(GtkAdjustment* adjustment, gdouble value) set_adjustment(GtkAdjustment* adjustment, gdouble value)
{ {
gtk_adjustment_set_value(adjustment, MAX(adjustment->lower, MIN(adjustment->upper - adjustment->page_size, value))); gtk_adjustment_set_value(adjustment, MAX(gtk_adjustment_get_lower(adjustment),
MIN(gtk_adjustment_get_upper(adjustment) - gtk_adjustment_get_page_size(adjustment), value)));
} }
void void
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment