From ec940554678b2776ef7e76e33ba1756cee0d3519 Mon Sep 17 00:00:00 2001 From: Claudio Saavedra Date: Mon, 11 Jun 2012 13:07:25 +0300 Subject: ephy-window: hide all chrome when entering fullscreen mode We keep track of the state of the chrome before entering fullscreen mode in order to restore it afterwards. Also, set tabs-allowed to FALSE in the EphyNotebook when in fullscreen mode. When leaving fullscreen mode, restore to the previous state. https://bugzilla.gnome.org/show_bug.cgi?id=671195 --- src/ephy-window.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/ephy-window.c') diff --git a/src/ephy-window.c b/src/ephy-window.c index 3ebeec78f..3a19b6307 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -339,6 +339,7 @@ struct _EphyWindowPrivate EphyEmbed *active_embed; EphyFindToolbar *find_toolbar; EphyWebViewChrome chrome; + EphyWebViewChrome pre_fullscreen_chrome; EphyEmbedEvent *context_event; guint idle_worker; GtkWidget *downloads_box; @@ -677,7 +678,7 @@ get_chromes_visibility (EphyWindow *window, else { *show_toolbar = (flags & EPHY_WEB_VIEW_CHROME_TOOLBAR) != 0; - *show_tabsbar = !priv->is_popup; + *show_tabsbar = !(priv->is_popup || priv->fullscreen_mode); } *show_downloads_box = (flags & EPHY_WEB_VIEW_CHROME_DOWNLOADS_BOX); @@ -808,6 +809,8 @@ ephy_window_fullscreen (EphyWindow *window) EphyEmbed *embed; priv->fullscreen_mode = TRUE; + priv->pre_fullscreen_chrome = priv->chrome; + priv->chrome = 0; /* sync status */ embed = window->priv->active_embed; @@ -821,6 +824,7 @@ static void ephy_window_unfullscreen (EphyWindow *window) { window->priv->fullscreen_mode = FALSE; + window->priv->chrome = window->priv->pre_fullscreen_chrome; sync_chromes_visibility (window); } -- cgit