diff --git a/gedit/gedit-app.c b/gedit/gedit-app.c
index 605f98e..de8439c 100644
--- a/gedit/gedit-app.c
+++ b/gedit/gedit-app.c
@@ -408,6 +408,8 @@ static void
 gedit_app_startup (GApplication *application)
 {
 	GeditApp *app = GEDIT_APP (application);
+	GtkBuilder *builder;
+	GError *error = NULL;
 	GtkSourceStyleSchemeManager *manager;
 	const gchar *dir;
 	gchar *icon_dir;
@@ -460,36 +462,30 @@ gedit_app_startup (GApplication *application)
 	app->priv->lockdown = gedit_settings_get_lockdown (GEDIT_SETTINGS (app->priv->settings));
 
 	/* app menu */
-	if (_gedit_app_has_app_menu (app))
+	g_action_map_add_action_entries (G_ACTION_MAP (app),
+		                         app_entries,
+		                         G_N_ELEMENTS (app_entries),
+		                         app);
+
+	builder = gtk_builder_new ();
+	if (!gtk_builder_add_from_resource (builder,
+	                                    "/org/gnome/gedit/ui/gedit-menu.ui",
+	                                    &error))
 	{
-		GtkBuilder *builder;
-		GError *error = NULL;
-
-		g_action_map_add_action_entries (G_ACTION_MAP (app),
-			                         app_entries,
-			                         G_N_ELEMENTS (app_entries),
-			                         app);
-
-		builder = gtk_builder_new ();
-		if (!gtk_builder_add_from_resource (builder,
-		                                    "/org/gnome/gedit/ui/gedit-menu.ui",
-		                                    &error))
-		{
-			g_warning ("loading menu builder file: %s", error->message);
-			g_error_free (error);
-		}
-		else
-		{
-			GMenuModel *app_menu;
-
-			app_menu = G_MENU_MODEL (gtk_builder_get_object (builder, "appmenu"));
-			gtk_application_set_app_menu (GTK_APPLICATION (application),
-			                              app_menu);
-		}
+		g_warning ("loading menu builder file: %s", error->message);
+		g_error_free (error);
+	}
+	else
+	{
+		GMenuModel *app_menu;
 
-		g_object_unref (builder);
+		app_menu = G_MENU_MODEL (gtk_builder_get_object (builder, "appmenu"));
+		gtk_application_set_app_menu (GTK_APPLICATION (application),
+		                              app_menu);
 	}
 
+	g_object_unref (builder);
+
 	/*
 	 * We use the default gtksourceview style scheme manager so that plugins
 	 * can obtain it easily without a gedit specific api, but we need to
@@ -1532,21 +1528,4 @@ _gedit_app_get_settings (GeditApp *app)
 	return app->priv->settings;
 }
 
-gboolean
-_gedit_app_has_app_menu (GeditApp *app)
-{
-	GtkSettings *gtk_settings;
-	gboolean show_app_menu;
-
-	g_return_val_if_fail (GEDIT_IS_APP (app), FALSE);
-
-	gtk_settings = gtk_settings_get_default ();
-	g_object_get (G_OBJECT (gtk_settings),
-	              "gtk-shell-shows-app-menu",
-	              &show_app_menu,
-	              NULL);
-
-	return show_app_menu;
-}
-
 /* ex:set ts=8 noet: */
diff --git a/gedit/gedit-app.h b/gedit/gedit-app.h
index 03baa3e..fd9d53d 100644
--- a/gedit/gedit-app.h
+++ b/gedit/gedit-app.h
@@ -144,8 +144,6 @@ void			 _gedit_app_set_default_print_settings	(GeditApp         *app,
 
 GObject			*_gedit_app_get_settings		(GeditApp  *app);
 
-gboolean		 _gedit_app_has_app_menu		(GeditApp  *app);
-
 G_END_DECLS
 
 #endif  /* __GEDIT_APP_H__  */
diff --git a/gedit/gedit-window.c b/gedit/gedit-window.c
index 48d429a..5106e7e 100644
--- a/gedit/gedit-window.c
+++ b/gedit/gedit-window.c
@@ -1474,6 +1474,21 @@ setup_toolbar_open_button (GeditWindow *window,
 			    1);
 }
 
+static gboolean
+gedit_window_has_app_menu (GeditWindow *window)
+{
+	GtkSettings *gtk_settings;
+	gboolean show_app_menu;
+
+	gtk_settings = gtk_settings_get_for_screen (gtk_widget_get_screen (GTK_WIDGET (window)));
+	g_object_get (G_OBJECT (gtk_settings),
+	              "gtk-shell-shows-app-menu",
+	              &show_app_menu,
+	              NULL);
+
+	return show_app_menu;
+}
+
 static void
 create_menu_bar_and_toolbar (GeditWindow *window,
 			     GtkWidget   *main_box)
@@ -1576,7 +1591,7 @@ create_menu_bar_and_toolbar (GeditWindow *window,
 		return;
 	}
 
-	if (!_gedit_app_has_app_menu (GEDIT_APP (g_application_get_default ())))
+	if (!gedit_window_has_app_menu (window))
 	{
 		gtk_ui_manager_add_ui_from_resource (manager,
 						     "/org/gnome/gedit/ui/gedit-ui-fallback.xml",
diff --git a/libgd b/libgd
--- a/libgd
+++ b/libgd
@@ -1 +1 @@
-Subproject commit 33561eea68af66209af8426c9ff55cc3143f0ab5
+Subproject commit 33561eea68af66209af8426c9ff55cc3143f0ab5-dirty
