From ec2ec6146310872c3e826ac9629d82142f2705b2 Mon Sep 17 00:00:00 2001 From: Sebastian Ramacher Date: Thu, 8 Mar 2012 19:12:27 +0100 Subject: [PATCH] Keep the current page in sc_toogle_fullscreen (Closes: #134) --- shortcuts.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shortcuts.c b/shortcuts.c index eabf567..e92ebdc 100644 --- a/shortcuts.c +++ b/shortcuts.c @@ -769,7 +769,7 @@ sc_toggle_fullscreen(girara_session_t* session, girara_argument_t* return false; } - static bool fullscreen = false; + static bool fullscreen = false; static int pages_per_row = 1; static double zoom = 1.0; @@ -786,6 +786,7 @@ sc_toggle_fullscreen(girara_session_t* session, girara_argument_t* /* reset scale */ zathura->document->scale = zoom; render_all(zathura); + page_set_delayed(zathura, zathura->document->current_page_number); } else { /* backup pages per row */ girara_setting_get(session, "pages-per-row", &pages_per_row); @@ -807,6 +808,7 @@ sc_toggle_fullscreen(girara_session_t* session, girara_argument_t* /* set full screen */ gtk_window_fullscreen(GTK_WINDOW(session->gtk.window)); + page_set_delayed(zathura, zathura->document->current_page_number); } fullscreen = fullscreen ? false : true;