Control: tags -1 + patch

On Wed, Sep 27, 2017 at 02:28:32PM +0100, Tony Garnock-Jones wrote:
> In stock (built-from-git) evince, viewing a PDF in full-screen mode, there is
> no menubar, and the toolbar autohides after a brief delay.
> 
> In the debian-patched version, with XDG_CURRENT_DESKTOP=GNOME, no menubar
> appears, and toolbar hiding works as usual in full-screen mode.
> 
> However, when running outside GNOME, there is a menubar, and neither the
> menubar nor the toolbar autohide in full-screen mode.
> 
> I expected both the menubar and toolbar to autohide in full-screen mode, even
> outside GNOME, in the debian-patched version.
> 
> I narrowed down the source of the problem to the recent inclusion of patches
> traditional_menu_bar.patch and/or unity_normal_titlebar.patch. I'm afraid I
> haven't narrowed it down any further than that.

The attached patch will hide the toolbar and menubar in fullscreen mode.
>From ec1b7acf386534abbda5a18791df1cfd80929ec4 Mon Sep 17 00:00:00 2001
From: Jason Crain <ja...@inspiresomeone.us>
Date: Sat, 16 Dec 2017 22:22:48 -0600
Subject: [PATCH] Hide menubar and toolbar in fullscreen mode

Debian's evince shows a toolbar and menubar in non-GNOME environments.
Hide these during fullscreen mode.
---
 shell/ev-window.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/shell/ev-window.c b/shell/ev-window.c
index 4e1b043b..53d23e45 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -636,13 +636,15 @@ update_chrome_visibility (EvWindow *window)
 	presentation = EV_WINDOW_IS_PRESENTATION (window);
 
 	toolbar = ((priv->chrome & EV_CHROME_TOOLBAR) != 0  || 
-		   (priv->chrome & EV_CHROME_RAISE_TOOLBAR) != 0) && !presentation;
+		   (priv->chrome & EV_CHROME_RAISE_TOOLBAR) != 0) && !presentation &&
+	          !ev_document_model_get_fullscreen (priv->model);
 	sidebar = (priv->chrome & EV_CHROME_SIDEBAR) != 0 && priv->document && !presentation;
 
 	set_widget_visibility (priv->toolbar, toolbar);
 	set_widget_visibility (priv->sidebar, sidebar);
 
-	gtk_application_window_set_show_menubar (GTK_APPLICATION_WINDOW (window), !presentation);
+	gtk_application_window_set_show_menubar (GTK_APPLICATION_WINDOW (window),
+		!presentation && !ev_document_model_get_fullscreen (priv->model));
 }
 
 static void
@@ -4187,6 +4189,7 @@ ev_window_stop_fullscreen (EvWindow *window,
 
 	ev_document_model_set_fullscreen (window->priv->model, FALSE);
 	ev_window_update_fullscreen_action (window);
+	update_chrome_visibility (window);
 
 	if (unfullscreen_window)
 		gtk_window_unfullscreen (GTK_WINDOW (window));
-- 
2.15.1

Reply via email to