From 903dae55e07c38cbefab14da342db5bcf1f6d1e8 Mon Sep 17 00:00:00 2001 From: Sebastian Ramacher Date: Tue, 5 Nov 2013 02:29:20 +0100 Subject: [PATCH] Get the correct adjustment Signed-off-by: Sebastian Ramacher --- zathura.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zathura.c b/zathura.c index 0ce00c1..2449698 100644 --- a/zathura.c +++ b/zathura.c @@ -700,9 +700,9 @@ document_open(zathura_t* zathura, const char* path, const char* password, GtkAdjustment* vadjustment = gtk_scrolled_window_get_vadjustment( GTK_SCROLLED_WINDOW(zathura->ui.session->gtk.view)); - const unsigned int view_width = (unsigned int)floor(gtk_adjustment_get_page_size(vadjustment)); + const unsigned int view_width = (unsigned int)floor(gtk_adjustment_get_page_size(hadjustment)); zathura_document_set_viewport_width(zathura->document, view_width); - const unsigned int view_height = (unsigned int)floor(gtk_adjustment_get_page_size(hadjustment)); + const unsigned int view_height = (unsigned int)floor(gtk_adjustment_get_page_size(vadjustment)); zathura_document_set_viewport_height(zathura->document, view_height); /* create blank pages */