[epiphany/mcatanzaro/752: 1/2] window: fix fullscreen and unfullscreen
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/mcatanzaro/752: 1/2] window: fix fullscreen and unfullscreen
- Date: Mon, 29 Apr 2019 14:40:30 +0000 (UTC)
commit 2145c300dab3d3e24aa55df0a74a798d47083a48
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Mon Apr 29 09:38:22 2019 -0500
window: fix fullscreen and unfullscreen
We had two separate implementations of fullscreen and unfullscreen. Only
the implementation in window-commands worked. Code in one or the other
was missed. Fix it.
src/ephy-window.c | 19 +++++++++++++++++++
src/window-commands.c | 3 ---
2 files changed, 19 insertions(+), 3 deletions(-)
---
diff --git a/src/ephy-window.c b/src/ephy-window.c
index f84b628a8..8be2354c1 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -572,6 +572,11 @@ static void
ephy_window_fullscreen (EphyWindow *window)
{
EphyEmbed *embed;
+ GActionGroup *action_group;
+ GAction *action;
+
+ ephy_window_show_fullscreen_header_bar (window);
+ gtk_window_fullscreen (GTK_WINDOW (window));
window->is_fullscreen = TRUE;
@@ -583,16 +588,30 @@ ephy_window_fullscreen (EphyWindow *window)
update_adaptive_mode (window);
sync_chromes_visibility (window);
ephy_embed_entering_fullscreen (embed);
+
+ action_group = gtk_widget_get_action_group (GTK_WIDGET (window), "win");
+ action = g_action_map_lookup_action (G_ACTION_MAP (action_group), "fullscreen");
+ g_simple_action_set_state (G_SIMPLE_ACTION (action), g_variant_new_boolean (TRUE));
}
static void
ephy_window_unfullscreen (EphyWindow *window)
{
+ GActionGroup *action_group;
+ GAction *action;
+
+ ephy_window_show_fullscreen_header_bar (window);
+ gtk_window_unfullscreen (GTK_WINDOW (window));
+
window->is_fullscreen = FALSE;
update_adaptive_mode (window);
sync_chromes_visibility (window);
ephy_embed_leaving_fullscreen (window->active_embed);
+
+ action_group = gtk_widget_get_action_group (GTK_WIDGET (window), "win");
+ action = g_action_map_lookup_action (G_ACTION_MAP (action_group), "fullscreen");
+ g_simple_action_set_state (G_SIMPLE_ACTION (action), g_variant_new_boolean (FALSE));
}
static gboolean
diff --git a/src/window-commands.c b/src/window-commands.c
index bbafd10b4..de6b87058 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -2370,14 +2370,11 @@ window_cmd_change_fullscreen_state (GSimpleAction *action,
gboolean active;
active = g_variant_get_boolean (state);
- ephy_window_show_fullscreen_header_bar (window);
if (active)
gtk_window_fullscreen (GTK_WINDOW (window));
else
gtk_window_unfullscreen (GTK_WINDOW (window));
-
- g_simple_action_set_state (action, g_variant_new_boolean (active));
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]