[epiphany/wip/exalm/gtk4: 43/43] WIP: Port to GTK4




commit 77dceef2df4767a3690bab1c1db7229e9ca07198
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Mon Nov 29 12:52:32 2021 +0500

    WIP: Port to GTK4
    
    Left out lib/widgets/ for now as that's a lot of work and I want to port enough
    of the foundation to test it first.
    
    Also left out:
    - lib/ephy-dnd.c - gtk4 dnd api is completely different, this will need a lot of changes
    - lib/ephy-gui.c - ephy_gui_get_current_event() is bad, this will need a rework everywhere
    - lib/ephy-suggestion.c - no libdazzle in gtk4
    
    FIXMEs:
    - embed/ephy-download.c
      - commented out the dialog
        - need to replace the file chooser button
        - unsure about gtk_box_pack_start() replacement
      - event time -> monotonic time
    - embed/ephy-embed.c
      - commented out nautilus floating bar
    - embed/ephy-find-toolbar.c
      - commented out gd tagged entry
      - shortcuts
    - embed/ephy-web-view.c
      - need to backport a leak fix
      - event vfuncs
    - lib/widgets/ephy-file-chooser.c
      - removed preview, need to backport
    - src/ephy-shell.c
      - large parts commented out until the rest of src/ is there
    - src/ephy-tab-view.c
      - dnd

 embed/ephy-about-handler.c            |  67 ++++++---
 embed/ephy-download.c                 |  14 +-
 embed/ephy-embed-shell.c              |  30 +---
 embed/ephy-embed-shell.h              |   6 +-
 embed/ephy-embed.c                    |  62 ++++----
 embed/ephy-find-toolbar.c             | 125 +++++++---------
 embed/ephy-find-toolbar.h             |   4 +-
 embed/ephy-reader-handler.c           |  10 +-
 embed/ephy-web-view.c                 | 181 ++++++++++++-----------
 embed/meson.build                     |   2 +-
 lib/ephy-file-helpers.c               |  12 +-
 lib/ephy-file-helpers.h               |   2 +-
 lib/ephy-flatpak-utils.c              |   2 +-
 lib/ephy-gui.c                        |  21 +--
 lib/ephy-notification-container.c     |  45 ++----
 lib/ephy-notification-container.h     |   4 +-
 lib/ephy-notification.c               |  36 ++---
 lib/ephy-notification.h               |   4 +-
 lib/meson.build                       |  73 +++++-----
 lib/widgets/ephy-file-chooser.c       |  15 +-
 lib/widgets/meson.build               |  32 ++--
 meson.build                           |   4 +-
 src/ephy-action-bar-start.c           |  29 ++--
 src/ephy-action-bar.c                 |   4 +-
 src/ephy-action-bar.h                 |   4 +-
 src/ephy-desktop-utils.c              |   9 --
 src/ephy-desktop-utils.h              |   2 -
 src/ephy-fullscreen-box.c             | 219 +++++++++++++---------------
 src/ephy-fullscreen-box.h             |   6 +-
 src/ephy-header-bar.c                 |  18 +--
 src/ephy-link.c                       |   2 +
 src/ephy-session.c                    |  42 +++---
 src/ephy-shell.c                      |  48 +++---
 src/ephy-tab-view.c                   | 180 ++++++++++++-----------
 src/ephy-tab-view.h                   |   8 +-
 src/ephy-window.c                     | 267 +++++++++++++++++-----------------
 src/ephy-window.h                     |   4 +-
 src/meson.build                       |  90 ++++++------
 src/resources/gtk/action-bar-start.ui |  70 +--------
 39 files changed, 814 insertions(+), 939 deletions(-)
---
diff --git a/embed/ephy-about-handler.c b/embed/ephy-about-handler.c
index fde68cb1f..1bfd8deff 100644
--- a/embed/ephy-about-handler.c
+++ b/embed/ephy-about-handler.c
@@ -163,14 +163,26 @@ ephy_about_handler_handle_about (EphyAboutHandler       *handler,
 {
   char *data;
   char *version;
-  GtkIconInfo *icon_info;
+  g_autofree char *path = NULL;
+  GtkIconTheme *icon_theme;
+  g_autoptr (GtkIconPaintable) paintable = NULL;
 
   version = g_strdup_printf (_("Version %s"), VERSION);
 
-  icon_info = gtk_icon_theme_lookup_icon (gtk_icon_theme_get_default (),
+  icon_theme = gtk_icon_theme_get_for_display (gdk_display_get_default ());
+  paintable = gtk_icon_theme_lookup_icon (icon_theme,
                                           APPLICATION_ID,
+                                          NULL,
                                           256,
-                                          GTK_ICON_LOOKUP_FORCE_SVG);
+                                          1,
+                                          GTK_TEXT_DIR_LTR,
+                                          GTK_ICON_LOOKUP_FORCE_REGULAR);
+
+  if (paintable) {
+    g_autoptr (GFile) file = gtk_icon_paintable_get_file (paintable);
+
+    path = g_file_get_path (file);
+  }
 
   data = g_strdup_printf ("<html><head><title>%s</title>"
                           "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />"
@@ -187,7 +199,7 @@ ephy_about_handler_handle_about (EphyAboutHandler       *handler,
                           "</table>"
                           "</div></div></body></html>",
                           _("About Web"),
-                          icon_info ? gtk_icon_info_get_filename (icon_info) : "",
+                          path ? path : "",
 #if !TECH_PREVIEW
                           _("Web"),
 #else
@@ -197,8 +209,6 @@ ephy_about_handler_handle_about (EphyAboutHandler       *handler,
                           _("A simple, clean, beautiful view of the web"),
                           "WebKitGTK", webkit_get_major_version (), webkit_get_minor_version (), 
webkit_get_micro_version ());
   g_free (version);
-  if (icon_info)
-    g_object_unref (icon_info);
 
   ephy_about_handler_finish_request (request, data, -1);
 
@@ -280,8 +290,9 @@ handle_applications_finished_cb (EphyAboutHandler       *handler,
 
     g_string_append (data_str, "</table></div></body></html>");
   } else {
-    g_autoptr (GtkIconInfo) icon_info = NULL;
-    g_autofree gchar *icon = g_strconcat ("application-x-addon-symbolic", NULL);
+    GtkIconTheme *icon_theme;
+    g_autoptr (GtkIconPaintable) paintable = NULL;
+    g_autofree char *path = NULL;
 
     g_string_append_printf (data_str, "<html><head><title>%s</title>"
                             "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />"
@@ -289,10 +300,21 @@ handle_applications_finished_cb (EphyAboutHandler       *handler,
                             "</head><body class=\"applications-body\">",
                             _("Applications"));
 
-    icon_info = gtk_icon_theme_lookup_icon (gtk_icon_theme_get_default (),
-                                            icon,
+    icon_theme = gtk_icon_theme_get_for_display (gdk_display_get_default ());
+    paintable = gtk_icon_theme_lookup_icon (icon_theme,
+                                            "application-x-addon-symbolic",
+                                            NULL,
                                             128,
+                                            1,
+                                            GTK_TEXT_DIR_LTR,
                                             0);
+
+    if (paintable) {
+      g_autoptr (GFile) file = gtk_icon_paintable_get_file (paintable);
+
+      path = g_file_get_path (file);
+    }
+
     g_string_append_printf (data_str,
                             "  <div id=\"overview\" class=\"overview-empty\">\n"
                             "    <img src=\"file://%s\"/>\n"
@@ -300,7 +322,7 @@ handle_applications_finished_cb (EphyAboutHandler       *handler,
                             "    <div><p>%s</p></div>\n"
                             "  </div>\n"
                             "</body></html>\n",
-                            icon_info ? gtk_icon_info_get_filename (icon_info) : "",
+                            path ? path : "",
                             /* Displayed when opening applications without any installed web apps. */
                             _("Applications"), _("You can add your favorite website by clicking <b>Install 
Site as Web Application…</b> within the page menu."));
   }
@@ -378,13 +400,26 @@ history_service_query_urls_cb (EphyHistoryService     *history,
   list_length = g_list_length (urls);
 
   if (list_length == 0 || !success) {
-    GtkIconInfo *icon_info;
-    g_autofree gchar *icon = g_strconcat (APPLICATION_ID, "-symbolic", NULL);
+    GtkIconTheme *icon_theme;
+    g_autoptr (GtkIconPaintable) paintable = NULL;
+    g_autofree char *path = NULL;
+    g_autofree char *icon = g_strconcat (APPLICATION_ID, "-symbolic", NULL);
 
-    icon_info = gtk_icon_theme_lookup_icon (gtk_icon_theme_get_default (),
+    icon_theme = gtk_icon_theme_get_for_display (gdk_display_get_default ());
+    paintable = gtk_icon_theme_lookup_icon (icon_theme,
                                             icon,
+                                            NULL,
                                             128,
+                                            1,
+                                            GTK_TEXT_DIR_LTR,
                                             0);
+
+    if (paintable) {
+      g_autoptr (GFile) file = gtk_icon_paintable_get_file (paintable);
+
+      path = g_file_get_path (file);
+    }
+
     g_string_append_printf (data_str,
                             "  <div id=\"overview\" class=\"overview-empty\">\n"
                             "    <img src=\"file://%s\"/>\n"
@@ -392,11 +427,9 @@ history_service_query_urls_cb (EphyHistoryService     *history,
                             "    <div><p>%s</p></div>\n"
                             "  </div>\n"
                             "</body></html>\n",
-                            icon_info ? gtk_icon_info_get_filename (icon_info) : "",
+                            path ? path : "",
                             /* Displayed when opening the browser for the first time. */
                             _("Welcome to Web"), _("Start browsing and your most-visited sites will appear 
here."));
-    if (icon_info)
-      g_object_unref (icon_info);
     goto out;
   }
 
diff --git a/embed/ephy-download.c b/embed/ephy-download.c
index eb95b6e9b..1066be75a 100644
--- a/embed/ephy-download.c
+++ b/embed/ephy-download.c
@@ -621,7 +621,7 @@ ephy_download_init (EphyDownload *download)
 
   download->action = EPHY_DOWNLOAD_ACTION_NONE;
 
-  download->start_time = gtk_get_current_event_time ();
+  download->start_time = g_get_monotonic_time (); // FIXME not sure if this is correct
 
   download->show_notification = TRUE;
 }
@@ -793,6 +793,7 @@ typedef struct {
   GtkFileChooser *file_chooser;
 } SuggestedFilenameData;
 
+#if 0
 static void
 filename_suggested_dialog_cb (GtkDialog             *dialog,
                               GtkResponseType        response,
@@ -815,7 +816,7 @@ filename_suggested_dialog_cb (GtkDialog             *dialog,
     ephy_download_cancel (data->download);
   }
 
-  gtk_widget_destroy (GTK_WIDGET (dialog));
+  gtk_window_destroy (GTK_WINDOW (dialog));
 
   g_free (data->suggested_filename);
   g_free (data);
@@ -885,8 +886,6 @@ filename_suggested_cb (EphyDownload *download,
   gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (filechooser), g_settings_get_string 
(EPHY_SETTINGS_WEB, EPHY_PREFS_WEB_LAST_DOWNLOAD_DIRECTORY));
   gtk_box_pack_start (GTK_BOX (box), filechooser, TRUE, TRUE, 0);
 
-  gtk_widget_show_all (box);
-
   data = g_new0 (SuggestedFilenameData, 1);
   data->download = download;
   data->webkit_download = webkit_download;
@@ -897,6 +896,7 @@ filename_suggested_cb (EphyDownload *download,
                     G_CALLBACK (filename_suggested_dialog_cb), data);
   gtk_window_present (GTK_WINDOW (dialog));
 }
+#endif
 
 EphyDownload *
 ephy_download_new_internal (WebKitDownload *download)
@@ -946,9 +946,9 @@ ephy_download_new (WebKitDownload *download)
                            ephy_download, 0);
 
   if (!ephy_is_running_inside_flatpak () && g_settings_get_boolean (EPHY_SETTINGS_WEB, 
EPHY_PREFS_WEB_ASK_ON_DOWNLOAD)) {
-    g_signal_connect (ephy_download, "filename-suggested",
-                      G_CALLBACK (filename_suggested_cb),
-                      NULL);
+//    g_signal_connect (ephy_download, "filename-suggested",
+//                      G_CALLBACK (filename_suggested_cb),
+//                      NULL);
   }
 
   return ephy_download;
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c
index 189370bd8..310dc830b 100644
--- a/embed/ephy-embed-shell.c
+++ b/embed/ephy-embed-shell.c
@@ -97,7 +97,7 @@ static EphyEmbedShell *embed_shell = NULL;
 
 static void ephy_embed_shell_tabs_catalog_iface_init (EphyTabsCatalogInterface *iface);
 
-G_DEFINE_TYPE_WITH_CODE (EphyEmbedShell, ephy_embed_shell, DZL_TYPE_APPLICATION,
+G_DEFINE_TYPE_WITH_CODE (EphyEmbedShell, ephy_embed_shell, ADW_TYPE_APPLICATION,
                          G_ADD_PRIVATE (EphyEmbedShell)
                          G_IMPLEMENT_INTERFACE (EPHY_TYPE_TABS_CATALOG,
                                                 ephy_embed_shell_tabs_catalog_iface_init))
@@ -888,27 +888,6 @@ enable_itp_setting_changed_cb (GSettings      *settings,
                                                                        EPHY_PREFS_WEB_ENABLE_ITP));
 }
 
-static void
-update_system_scrollbars (EphyEmbedShell *shell)
-{
-  EphyEmbedShellPrivate *priv = ephy_embed_shell_get_instance_private (shell);
-  const char *theme_name;
-  gboolean enabled;
-
-  g_object_get (gtk_settings_get_default (),
-                "gtk-theme_name", &theme_name,
-                NULL);
-
-  /* Don't enable system scrollbars for Adwaita */
-  enabled = g_strcmp0 (theme_name, "Adwaita") &&
-            g_strcmp0 (theme_name, "Adwaita-dark") &&
-            g_strcmp0 (theme_name, "HighContrast") &&
-            g_strcmp0 (theme_name, "HighContrastInverse");
-
-  webkit_web_context_set_use_system_appearance_for_scrollbars (priv->web_context,
-                                                               enabled);
-}
-
 static void
 ephy_embed_shell_startup (GApplication *application)
 {
@@ -1001,13 +980,6 @@ ephy_embed_shell_startup (GApplication *application)
 
   g_signal_connect_object (EPHY_SETTINGS_WEB, "changed::enable-itp",
                            G_CALLBACK (enable_itp_setting_changed_cb), shell, 0);
-
-  update_system_scrollbars (shell);
-
-  g_signal_connect_swapped (gtk_settings_get_default (),
-                            "notify::gtk-theme-name",
-                            G_CALLBACK (update_system_scrollbars),
-                            shell);
 }
 
 static void
diff --git a/embed/ephy-embed-shell.h b/embed/ephy-embed-shell.h
index 9464d42d4..2815c19bd 100644
--- a/embed/ephy-embed-shell.h
+++ b/embed/ephy-embed-shell.h
@@ -21,7 +21,7 @@
 
 #pragma once
 
-#include <dazzle.h>
+#include <adwaita.h>
 #include <webkit2/webkit2.h>
 
 #include "ephy-downloads-manager.h"
@@ -38,7 +38,7 @@ typedef struct _EphyFiltersManager EphyFiltersManager;
 
 #define EPHY_TYPE_EMBED_SHELL (ephy_embed_shell_get_type ())
 
-G_DECLARE_DERIVABLE_TYPE (EphyEmbedShell, ephy_embed_shell, EPHY, EMBED_SHELL, DzlApplication)
+G_DECLARE_DERIVABLE_TYPE (EphyEmbedShell, ephy_embed_shell, EPHY, EMBED_SHELL, AdwApplication)
 
 typedef enum
 {
@@ -54,7 +54,7 @@ typedef enum
 
 struct _EphyEmbedShellClass
 {
-  DzlApplicationClass parent_class;
+  AdwApplicationClass parent_class;
 
   void    (* restored_window)  (EphyEmbedShell *shell);
 };
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c
index 334baf589..e110ad2fc 100644
--- a/embed/ephy-embed.c
+++ b/embed/ephy-embed.c
@@ -35,7 +35,7 @@
 #include "ephy-settings.h"
 #include "ephy-string.h"
 #include "ephy-web-view.h"
-#include "nautilus-floating-bar.h"
+//#include "nautilus-floating-bar.h"
 
 #include <glib/gi18n.h>
 #include <webkit2/webkit2.h>
@@ -158,13 +158,13 @@ static void
 ephy_embed_set_statusbar_label (EphyEmbed  *embed,
                                 const char *label)
 {
-  nautilus_floating_bar_set_primary_label (NAUTILUS_FLOATING_BAR (embed->floating_bar), label);
+/*  nautilus_floating_bar_set_primary_label (NAUTILUS_FLOATING_BAR (embed->floating_bar), label);
 
   if (label == NULL || label[0] == '\0') {
     gtk_widget_hide (embed->floating_bar);
     gtk_widget_set_halign (embed->floating_bar, GTK_ALIGN_START);
   } else
-    gtk_widget_show (embed->floating_bar);
+    gtk_widget_show (embed->floating_bar);*/
 }
 
 static void
@@ -245,7 +245,7 @@ ephy_embed_destroy_top_widgets (EphyEmbed *embed)
 
   for (iter = embed->destroy_on_transition_list; iter; iter = iter->next) {
     g_signal_handlers_disconnect_by_func (iter->data, remove_from_destroy_list_cb, embed);
-    gtk_widget_destroy (GTK_WIDGET (iter->data));
+    gtk_box_remove (embed->top_widgets_vbox, GTK_WIDGET (iter->data));
   }
 
   embed->destroy_on_transition_list = NULL;
@@ -310,7 +310,7 @@ load_changed_cb (WebKitWebView   *web_view,
   }
 }
 
-static void
+static gboolean
 ephy_embed_grab_focus (GtkWidget *widget)
 {
   GtkWidget *child;
@@ -318,7 +318,9 @@ ephy_embed_grab_focus (GtkWidget *widget)
   child = GTK_WIDGET (ephy_embed_get_web_view (EPHY_EMBED (widget)));
 
   if (child)
-    gtk_widget_grab_focus (child);
+    return gtk_widget_grab_focus (child);
+
+  return FALSE;
 }
 
 
@@ -685,7 +687,7 @@ ephy_embed_mapped_cb (GtkWidget *widget,
 {
   ephy_embed_maybe_load_delayed_request ((EphyEmbed *)widget);
 }
-
+/* FIXME
 static gboolean
 on_enter_notify_event (GtkWidget        *widget,
                        GdkEventCrossing *event,
@@ -705,7 +707,7 @@ on_enter_notify_event (GtkWidget        *widget,
 
   return GDK_EVENT_PROPAGATE;
 }
-
+*/
 static void
 ephy_embed_constructed (GObject *object)
 {
@@ -721,33 +723,31 @@ ephy_embed_constructed (GObject *object)
 
   /* Skeleton */
   embed->overlay = gtk_overlay_new ();
+  gtk_widget_set_vexpand (embed->overlay, TRUE);
 
-  gtk_widget_add_events (embed->overlay,
-                         GDK_ENTER_NOTIFY_MASK |
-                         GDK_LEAVE_NOTIFY_MASK);
-  gtk_container_add (GTK_CONTAINER (embed->overlay), GTK_WIDGET (embed->web_view));
+  gtk_overlay_set_child (GTK_OVERLAY (embed->overlay), GTK_WIDGET (embed->web_view));
 
   /* Floating message popup for fullscreen mode. */
   embed->fullscreen_message_label = gtk_label_new (NULL);
   gtk_widget_set_name (embed->fullscreen_message_label, "fullscreen-popup");
   gtk_widget_set_halign (embed->fullscreen_message_label, GTK_ALIGN_CENTER);
   gtk_widget_set_valign (embed->fullscreen_message_label, GTK_ALIGN_CENTER);
-  gtk_widget_set_no_show_all (embed->fullscreen_message_label, TRUE);
+  gtk_widget_hide (embed->fullscreen_message_label);
   gtk_overlay_add_overlay (GTK_OVERLAY (embed->overlay), embed->fullscreen_message_label);
   ephy_embed_set_fullscreen_message (embed, FALSE);
 
   /* statusbar is hidden by default */
-  embed->floating_bar = nautilus_floating_bar_new (NULL, NULL, FALSE);
+/*  embed->floating_bar = nautilus_floating_bar_new (NULL, NULL, FALSE);
   gtk_widget_set_halign (embed->floating_bar, GTK_ALIGN_START);
   gtk_widget_set_valign (embed->floating_bar, GTK_ALIGN_END);
-  gtk_widget_set_no_show_all (embed->floating_bar, TRUE);
-  g_signal_connect_object (embed->overlay, "enter-notify-event", G_CALLBACK (on_enter_notify_event), embed, 
0);
+  gtk_widget_hide (embed->floating_bar);
+// FIXME  g_signal_connect_object (embed->overlay, "enter-notify-event", G_CALLBACK (on_enter_notify_event), 
embed, 0);
 
-  gtk_overlay_add_overlay (GTK_OVERLAY (embed->overlay), embed->floating_bar);
+  gtk_overlay_add_overlay (GTK_OVERLAY (embed->overlay), embed->floating_bar);*/
 
   if (embed->progress_bar_enabled) {
     embed->progress = gtk_progress_bar_new ();
-    gtk_style_context_add_class (gtk_widget_get_style_context (embed->progress), "osd");
+    gtk_widget_add_css_class (embed->progress, "osd");
     gtk_widget_set_halign (embed->progress, GTK_ALIGN_FILL);
     gtk_widget_set_valign (embed->progress, GTK_ALIGN_START);
     gtk_overlay_add_overlay (GTK_OVERLAY (embed->overlay), embed->progress);
@@ -758,22 +758,14 @@ ephy_embed_constructed (GObject *object)
                     G_CALLBACK (ephy_embed_find_toolbar_close_cb),
                     embed);
 
-  gtk_box_pack_start (GTK_BOX (embed),
-                      GTK_WIDGET (embed->find_toolbar),
-                      FALSE, FALSE, 0);
+  gtk_box_append (GTK_BOX (embed), GTK_WIDGET (embed->find_toolbar));
 
   if (embed->progress_bar_enabled)
     embed->progress_update_handler_id = g_signal_connect (embed->web_view, "notify::estimated-load-progress",
                                                           G_CALLBACK (progress_update), object);
 
-  gtk_box_pack_start (GTK_BOX (embed),
-                      GTK_WIDGET (embed->top_widgets_vbox),
-                      FALSE, FALSE, 0);
-  gtk_box_pack_start (GTK_BOX (embed), embed->overlay, TRUE, TRUE, 0);
-
-  gtk_widget_show (GTK_WIDGET (embed->top_widgets_vbox));
-  gtk_widget_show (GTK_WIDGET (embed->web_view));
-  gtk_widget_show_all (embed->overlay);
+  gtk_box_append (GTK_BOX (embed), GTK_WIDGET (embed->top_widgets_vbox));
+  gtk_box_append (GTK_BOX (embed), GTK_WIDGET (embed->overlay));
 
   g_object_connect (embed->web_view,
                     "signal::notify::title", G_CALLBACK (web_view_title_changed_cb), embed,
@@ -804,11 +796,9 @@ ephy_embed_constructed (GObject *object)
     gtk_info_bar_set_message_type (GTK_INFO_BAR (info_bar), GTK_MESSAGE_INFO);
     /* Translators: this means WebDriver control. */
     label = gtk_label_new (_("Web is being controlled by automation."));
-    gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (info_bar))), label, FALSE, 
FALSE, 0);
-    gtk_widget_show (label);
+    gtk_info_bar_add_child (GTK_INFO_BAR (info_bar), label);
 
     ephy_embed_add_top_widget (embed, info_bar, EPHY_EMBED_TOP_WIDGET_POLICY_RETAIN_ON_TRANSITION);
-    gtk_widget_show (info_bar);
   }
 }
 
@@ -882,8 +872,7 @@ ephy_embed_add_top_widget (EphyEmbed                *embed,
     g_signal_connect (widget, "destroy", G_CALLBACK (remove_from_destroy_list_cb), embed);
   }
 
-  gtk_box_pack_end (embed->top_widgets_vbox,
-                    GTK_WIDGET (widget), FALSE, FALSE, 0);
+  gtk_box_prepend (embed->top_widgets_vbox, widget);
 }
 
 /**
@@ -909,8 +898,7 @@ ephy_embed_remove_top_widget (EphyEmbed *embed,
     embed->destroy_on_transition_list = list;
   }
 
-  gtk_container_remove (GTK_CONTAINER (embed->top_widgets_vbox),
-                        GTK_WIDGET (widget));
+  gtk_box_remove (embed->top_widgets_vbox, widget);
 }
 
 /**
@@ -1004,6 +992,6 @@ ephy_embed_detach_notification_container (EphyEmbed *embed)
      * notification widget, removing it from the container will destroy the
      * singleton. To prevent this, add a reference to it before removing it
      * from the container. */
-    gtk_container_remove (GTK_CONTAINER (embed->overlay), g_object_ref (GTK_WIDGET (container)));
+    gtk_overlay_remove_overlay (GTK_OVERLAY (embed->overlay), g_object_ref (GTK_WIDGET (container)));
   }
 }
diff --git a/embed/ephy-find-toolbar.c b/embed/ephy-find-toolbar.c
index 45a71b8e0..442afc5ed 100644
--- a/embed/ephy-find-toolbar.c
+++ b/embed/ephy-find-toolbar.c
@@ -23,25 +23,26 @@
 #include "ephy-find-toolbar.h"
 
 #include "ephy-debug.h"
-#include "contrib/gd-tagged-entry.h"
+//#include "contrib/gd-tagged-entry.h"
 
 #include <math.h>
 
+#include <adwaita.h>
 #include <gdk/gdkkeysyms.h>
 #include <glib/gi18n.h>
-#include <handy.h>
 #include <string.h>
 #include <webkit2/webkit2.h>
 
 struct _EphyFindToolbar {
-  GtkBin parent_instance;
+  AdwBin parent_instance;
 
   GCancellable *cancellable;
   WebKitWebView *web_view;
   WebKitFindController *controller;
   GtkWidget *search_bar;
-  GdTaggedEntry *entry;
-  GdTaggedEntryTag *entry_tag;
+  GtkWidget *entry;
+//  GdTaggedEntry *entry;
+//  GdTaggedEntryTag *entry_tag;
   GtkWidget *next;
   GtkWidget *prev;
   guint num_matches;
@@ -53,7 +54,7 @@ struct _EphyFindToolbar {
   gboolean typing_ahead;
 };
 
-G_DEFINE_TYPE (EphyFindToolbar, ephy_find_toolbar, GTK_TYPE_BIN)
+G_DEFINE_TYPE (EphyFindToolbar, ephy_find_toolbar, ADW_TYPE_BIN)
 
 enum {
   PROP_0,
@@ -88,12 +89,12 @@ static void ephy_find_toolbar_set_web_view (EphyFindToolbar *toolbar,
 
 static void
 update_search_tag (EphyFindToolbar *toolbar)
-{
+{/*
   g_autofree gchar *label = NULL;
 
   label = g_strdup_printf ("%u/%u", toolbar->current_match, toolbar->num_matches);
   gd_tagged_entry_tag_set_label (toolbar->entry_tag, label);
-  gd_tagged_entry_add_tag (toolbar->entry, toolbar->entry_tag);
+  gd_tagged_entry_add_tag (toolbar->entry, toolbar->entry_tag);*/
 }
 
 static void
@@ -141,7 +142,7 @@ clear_status (EphyFindToolbar *toolbar)
                 "primary-icon-name", "edit-find-symbolic",
                 NULL);
 
-  gd_tagged_entry_remove_tag (toolbar->entry, toolbar->entry_tag);
+//  gd_tagged_entry_remove_tag (toolbar->entry, toolbar->entry_tag);
 
   gtk_widget_set_sensitive (toolbar->prev, FALSE);
   gtk_widget_set_sensitive (toolbar->next, FALSE);
@@ -213,7 +214,7 @@ static void
 update_find_string (EphyFindToolbar *toolbar)
 {
   g_free (toolbar->find_string);
-  toolbar->find_string = g_strdup (gtk_entry_get_text (GTK_ENTRY (toolbar->entry)));
+  toolbar->find_string = g_strdup (gtk_editable_get_text (GTK_EDITABLE (toolbar->entry)));
 
   g_clear_handle_id (&toolbar->find_source_id, g_source_remove);
 
@@ -232,7 +233,7 @@ ephy_find_toolbar_activate_link (EphyFindToolbar *toolbar,
 {
   return FALSE;
 }
-
+#if 0 // FIXME
 static gboolean
 entry_key_press_event_cb (GtkEntry        *entry,
                           GdkEventKey     *event,
@@ -275,6 +276,7 @@ entry_key_press_event_cb (GtkEntry        *entry,
 
   return handled;
 }
+#endif
 
 static void
 entry_activate_cb (GtkWidget       *entry,
@@ -287,47 +289,23 @@ entry_activate_cb (GtkWidget       *entry,
   }
 }
 
-static void
+static gboolean
 ephy_find_toolbar_grab_focus (GtkWidget *widget)
 {
   EphyFindToolbar *toolbar = EPHY_FIND_TOOLBAR (widget);
 
-  gtk_widget_grab_focus (GTK_WIDGET (toolbar->entry));
-}
-
-static gboolean
-ephy_find_toolbar_draw (GtkWidget *widget,
-                        cairo_t   *cr)
-{
-  GtkStyleContext *context;
-
-  context = gtk_widget_get_style_context (widget);
-
-  gtk_style_context_save (context);
-  gtk_style_context_set_state (context, gtk_widget_get_state_flags (widget));
-
-  gtk_render_background (context, cr, 0, 0,
-                         gtk_widget_get_allocated_width (widget),
-                         gtk_widget_get_allocated_height (widget));
-
-  gtk_render_frame (context, cr, 0, 0,
-                    gtk_widget_get_allocated_width (widget),
-                    gtk_widget_get_allocated_height (widget));
-
-  gtk_style_context_restore (context);
-
-  return GTK_WIDGET_CLASS (ephy_find_toolbar_parent_class)->draw (widget, cr);
+  return gtk_widget_grab_focus (GTK_WIDGET (toolbar->entry));
 }
 
 static void
-search_entry_clear_cb (GtkEntry *entry,
-                       gpointer  user_data)
+search_entry_clear_cb (GtkEditable *entry,
+                       gpointer     user_data)
 {
-  gtk_entry_set_text (entry, "");
+  gtk_editable_set_text (entry, "");
 }
 
 static void
-search_entry_changed_cb (GtkEntry        *entry,
+search_entry_changed_cb (GtkEditable     *entry,
                          EphyFindToolbar *toolbar)
 {
   const char *str;
@@ -336,7 +314,7 @@ search_entry_changed_cb (GtkEntry        *entry,
   gboolean primary_active = FALSE;
   gboolean secondary_active = FALSE;
 
-  str = gtk_entry_get_text (entry);
+  str = gtk_editable_get_text (entry);
 
   if (str == NULL || *str == '\0') {
     primary_icon_name = "edit-find-symbolic";
@@ -363,7 +341,7 @@ ephy_find_toolbar_load_changed_cb (WebKitWebView   *web_view,
                                    EphyFindToolbar *toolbar)
 {
   if (load_event == WEBKIT_LOAD_STARTED &&
-      hdy_search_bar_get_search_mode (HDY_SEARCH_BAR (toolbar->search_bar))) {
+      gtk_search_bar_get_search_mode (GTK_SEARCH_BAR (toolbar->search_bar))) {
     ephy_find_toolbar_close (toolbar);
   }
 }
@@ -374,46 +352,48 @@ ephy_find_toolbar_init (EphyFindToolbar *toolbar)
   GtkWidget *clamp;
   GtkWidget *box;
 
-  toolbar->search_bar = hdy_search_bar_new ();
-  gtk_container_add (GTK_CONTAINER (toolbar), toolbar->search_bar);
+  toolbar->search_bar = gtk_search_bar_new ();
+  adw_bin_set_child (ADW_BIN (toolbar), toolbar->search_bar);
 
-  clamp = GTK_WIDGET (hdy_clamp_new ());
-  hdy_clamp_set_maximum_size (HDY_CLAMP (clamp), 400);
-  hdy_clamp_set_tightening_threshold (HDY_CLAMP (clamp), 300);
-  gtk_container_add (GTK_CONTAINER (toolbar->search_bar), clamp);
+  clamp = GTK_WIDGET (adw_clamp_new ());
+  adw_clamp_set_maximum_size (ADW_CLAMP (clamp), 400);
+  adw_clamp_set_tightening_threshold (ADW_CLAMP (clamp), 300);
+  gtk_search_bar_set_child (GTK_SEARCH_BAR (toolbar->search_bar), clamp);
 
   box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
-  gtk_style_context_add_class (gtk_widget_get_style_context (box), "linked");
-  gtk_container_add (GTK_CONTAINER (clamp), box);
+  gtk_widget_add_css_class (box, "linked");
+  adw_clamp_set_child (ADW_CLAMP (clamp), box);
 
-  toolbar->entry = gd_tagged_entry_new ();
-  toolbar->entry_tag = gd_tagged_entry_tag_new ("");
-  gd_tagged_entry_tag_set_style (toolbar->entry_tag, "search-entry-occurrences-tag");
-  gd_tagged_entry_tag_set_has_close_button (toolbar->entry_tag, FALSE);
+  // FIXME tagged entry
+  toolbar->entry = gtk_search_entry_new ();
+//  toolbar->entry = gd_tagged_entry_new ();
+//  toolbar->entry_tag = gd_tagged_entry_tag_new ("");
+//  gd_tagged_entry_tag_set_style (toolbar->entry_tag, "search-entry-occurrences-tag");
+//  gd_tagged_entry_tag_set_has_close_button (toolbar->entry_tag, FALSE);
 
   gtk_widget_set_hexpand (GTK_WIDGET (toolbar->entry), TRUE);
   gtk_entry_set_placeholder_text (GTK_ENTRY (toolbar->entry), _("Type to search…"));
-  gtk_container_add (GTK_CONTAINER (box), GTK_WIDGET (toolbar->entry));
+  gtk_box_append (GTK_BOX (box), GTK_WIDGET (toolbar->entry));
 
   /* Prev */
-  toolbar->prev = gtk_button_new_from_icon_name ("go-up-symbolic", GTK_ICON_SIZE_MENU);
+  toolbar->prev = gtk_button_new_from_icon_name ("go-up-symbolic");
   gtk_widget_set_tooltip_text (toolbar->prev,
                                _("Find previous occurrence of the search string"));
-  gtk_container_add (GTK_CONTAINER (box), toolbar->prev);
+  gtk_box_append (GTK_BOX (box), toolbar->prev);
   gtk_widget_set_sensitive (toolbar->prev, FALSE);
 
   /* Next */
-  toolbar->next = gtk_button_new_from_icon_name ("go-down-symbolic", GTK_ICON_SIZE_MENU);
+  toolbar->next = gtk_button_new_from_icon_name ("go-down-symbolic");
   gtk_widget_set_tooltip_text (toolbar->next,
                                _("Find next occurrence of the search string"));
-  gtk_container_add (GTK_CONTAINER (box), toolbar->next);
+  gtk_box_append (GTK_BOX (box), toolbar->next);
   gtk_widget_set_sensitive (toolbar->next, FALSE);
 
   /* connect signals */
   g_signal_connect (toolbar->entry, "icon-release",
                     G_CALLBACK (search_entry_clear_cb), toolbar);
-  g_signal_connect (toolbar->entry, "key-press-event",
-                    G_CALLBACK (entry_key_press_event_cb), toolbar);
+//  g_signal_connect (toolbar->entry, "key-press-event",
+//                    G_CALLBACK (entry_key_press_event_cb), toolbar);
   g_signal_connect_after (toolbar->entry, "changed",
                           G_CALLBACK (search_entry_changed_cb), toolbar);
   g_signal_connect (toolbar->entry, "activate",
@@ -422,14 +402,12 @@ ephy_find_toolbar_init (EphyFindToolbar *toolbar)
                             G_CALLBACK (ephy_find_toolbar_find_next), toolbar);
   g_signal_connect_swapped (toolbar->prev, "clicked",
                             G_CALLBACK (ephy_find_toolbar_find_previous), toolbar);
-  hdy_search_bar_connect_entry (HDY_SEARCH_BAR (toolbar->search_bar),
-                                GTK_ENTRY (toolbar->entry));
+  gtk_search_bar_connect_entry (GTK_SEARCH_BAR (toolbar->search_bar),
+                                GTK_EDITABLE (toolbar->entry));
 
-  search_entry_changed_cb (GTK_ENTRY (toolbar->entry), toolbar);
+  search_entry_changed_cb (GTK_EDITABLE (toolbar->entry), toolbar);
 
   toolbar->cancellable = g_cancellable_new ();
-
-  gtk_widget_show_all (GTK_WIDGET (toolbar));
 }
 
 static void
@@ -506,7 +484,6 @@ ephy_find_toolbar_class_init (EphyFindToolbarClass *klass)
   object_class->get_property = ephy_find_toolbar_get_property;
   object_class->set_property = ephy_find_toolbar_set_property;
 
-  widget_class->draw = ephy_find_toolbar_draw;
   widget_class->grab_focus = ephy_find_toolbar_grab_focus;
 
   signals[CLOSE] =
@@ -539,7 +516,7 @@ ephy_find_toolbar_new (WebKitWebView *web_view)
 const char *
 ephy_find_toolbar_get_text (EphyFindToolbar *toolbar)
 {
-  return gtk_entry_get_text (GTK_ENTRY (toolbar->entry));
+  return gtk_editable_get_text (GTK_EDITABLE (toolbar->entry));
 }
 
 static void
@@ -639,7 +616,7 @@ ephy_find_toolbar_selection_async (GObject      *source_object,
     if (exception) {
       g_warning ("Error running javascript: %s", jsc_exception_get_message (exception));
     } else if (strlen (str_value)) {
-      gtk_entry_set_text (GTK_ENTRY (toolbar->entry), str_value);
+      gtk_editable_set_text (GTK_EDITABLE (toolbar->entry), str_value);
       gtk_editable_select_region (GTK_EDITABLE (toolbar->entry), 0, -1);
     }
   }
@@ -659,15 +636,15 @@ ephy_find_toolbar_open (EphyFindToolbar *toolbar,
 
   gtk_editable_select_region (GTK_EDITABLE (toolbar->entry), 0, -1);
 
-  hdy_search_bar_set_search_mode (HDY_SEARCH_BAR (toolbar->search_bar), TRUE);
-  hdy_search_bar_set_show_close_button (HDY_SEARCH_BAR (toolbar->search_bar), TRUE);
+  gtk_search_bar_set_search_mode (GTK_SEARCH_BAR (toolbar->search_bar), TRUE);
+  gtk_search_bar_set_show_close_button (GTK_SEARCH_BAR (toolbar->search_bar), TRUE);
   gtk_widget_grab_focus (GTK_WIDGET (toolbar->entry));
 }
 
 void
 ephy_find_toolbar_close (EphyFindToolbar *toolbar)
 {
-  hdy_search_bar_set_search_mode (HDY_SEARCH_BAR (toolbar->search_bar), FALSE);
+  gtk_search_bar_set_search_mode (GTK_SEARCH_BAR (toolbar->search_bar), FALSE);
 
   if (toolbar->web_view == NULL) return;
 
@@ -677,7 +654,7 @@ ephy_find_toolbar_close (EphyFindToolbar *toolbar)
 void
 ephy_find_toolbar_request_close (EphyFindToolbar *toolbar)
 {
-  if (hdy_search_bar_get_search_mode (HDY_SEARCH_BAR (toolbar->search_bar))) {
+  if (gtk_search_bar_get_search_mode (GTK_SEARCH_BAR (toolbar->search_bar))) {
     g_signal_emit (toolbar, signals[CLOSE], 0);
   }
 }
diff --git a/embed/ephy-find-toolbar.h b/embed/ephy-find-toolbar.h
index 829c6355d..7fabe3073 100644
--- a/embed/ephy-find-toolbar.h
+++ b/embed/ephy-find-toolbar.h
@@ -21,7 +21,7 @@
 
 #pragma once
 
-#include <gtk/gtk.h>
+#include <adwaita.h>
 
 #include "ephy-web-view.h"
 
@@ -29,7 +29,7 @@ G_BEGIN_DECLS
 
 #define EPHY_TYPE_FIND_TOOLBAR (ephy_find_toolbar_get_type ())
 
-G_DECLARE_FINAL_TYPE (EphyFindToolbar, ephy_find_toolbar, EPHY, FIND_TOOLBAR, GtkBin)
+G_DECLARE_FINAL_TYPE (EphyFindToolbar, ephy_find_toolbar, EPHY, FIND_TOOLBAR, AdwBin)
 
 EphyFindToolbar *ephy_find_toolbar_new           (WebKitWebView *web_view);
 
diff --git a/embed/ephy-reader-handler.c b/embed/ephy-reader-handler.c
index 25adf90cb..98d81c5e8 100644
--- a/embed/ephy-reader-handler.c
+++ b/embed/ephy-reader-handler.c
@@ -27,9 +27,9 @@
 #include "ephy-settings.h"
 #include "ephy-web-view.h"
 
+#include <adwaita.h>
 #include <gio/gio.h>
 #include <glib/gi18n.h>
-#include <handy.h>
 #include <string.h>
 
 struct _EphyReaderHandler {
@@ -164,7 +164,7 @@ readability_js_finish_cb (GObject      *object,
   const gchar *title;
   const gchar *font_style;
   const gchar *color_scheme;
-  HdyStyleManager *style_manager;
+  AdwStyleManager *style_manager;
 
   js_result = webkit_web_view_run_javascript_finish (web_view, result, &error);
   if (!js_result) {
@@ -184,10 +184,10 @@ readability_js_finish_cb (GObject      *object,
                           g_settings_get_enum (EPHY_SETTINGS_READER,
                                                EPHY_PREFS_READER_FONT_STYLE));
 
-  style_manager = hdy_style_manager_get_default ();
+  style_manager = adw_style_manager_get_default ();
 
-  if (hdy_style_manager_get_system_supports_color_schemes (style_manager))
-    color_scheme = hdy_style_manager_get_dark (style_manager) ? "dark" : "light";
+  if (adw_style_manager_get_system_supports_color_schemes (style_manager))
+    color_scheme = adw_style_manager_get_dark (style_manager) ? "dark" : "light";
   else
     color_scheme = enum_nick (EPHY_TYPE_PREFS_READER_COLOR_SCHEME,
                               g_settings_get_enum (EPHY_SETTINGS_READER,
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 81af0ed81..7d5adba3b 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -50,11 +50,11 @@
 #include "ephy-web-app-utils.h"
 #include "ephy-zoom.h"
 
+#include <adwaita.h>
 #include <gio/gio.h>
 #include <glib/gi18n.h>
 #include <glib/gstdio.h>
 #include <gtk/gtk.h>
-#include <handy.h>
 
 /**
  * SECTION:ephy-web-view
@@ -129,7 +129,7 @@ struct _EphyWebView {
   EphyWebViewErrorPage error_page;
 
   guint unresponsive_process_timeout_id;
-  GtkWidget *unresponsive_process_dialog;
+  GtkWindow *unresponsive_process_dialog;
 
   guint64 uid;
 };
@@ -161,17 +161,27 @@ open_response_cb (GtkFileChooser           *dialog,
                   WebKitFileChooserRequest *request)
 {
   if (response == GTK_RESPONSE_ACCEPT) {
-    GSList *file_list = gtk_file_chooser_get_filenames (dialog);
+    g_autoptr (GListModel) files = gtk_file_chooser_get_files (dialog);
     GPtrArray *file_array = g_ptr_array_new ();
+    g_autoptr (GFile) current_folder = NULL;
+    g_autofree char *current_folder_path = NULL;
+    guint i, n = g_list_model_get_n_items (files);
 
-    for (GSList *file = file_list; file; file = g_slist_next (file))
-      g_ptr_array_add (file_array, file->data);
+    for (i = 0; i < n; i++) {
+      g_autoptr (GFile) file = g_list_model_get_item (files, i);
+
+      g_ptr_array_add (file_array, file);
+    }
 
     g_ptr_array_add (file_array, NULL);
     webkit_file_chooser_request_select_files (request, (const char * const *)file_array->pdata);
-    g_slist_free_full (file_list, g_free);
-    g_ptr_array_free (file_array, FALSE);
-    g_settings_set_string (EPHY_SETTINGS_WEB, EPHY_PREFS_WEB_LAST_UPLOAD_DIRECTORY, 
gtk_file_chooser_get_current_folder (GTK_FILE_CHOOSER (dialog)));
+    g_ptr_array_free (file_array, FALSE); // FIXME leak?
+
+    current_folder = gtk_file_chooser_get_current_folder (dialog);
+    current_folder_path  = g_file_get_path (current_folder);
+    g_settings_set_string (EPHY_SETTINGS_WEB,
+                           EPHY_PREFS_WEB_LAST_UPLOAD_DIRECTORY,
+                           current_folder_path);
   } else {
     webkit_file_chooser_request_cancel (request);
   }
@@ -184,23 +194,30 @@ static gboolean
 ephy_web_view_run_file_chooser (WebKitWebView            *web_view,
                                 WebKitFileChooserRequest *request)
 {
-  GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (web_view));
+  GtkRoot *root = gtk_widget_get_root(GTK_WIDGET (web_view));
   GtkFileChooser *dialog;
   gboolean allows_multiple_selection = webkit_file_chooser_request_get_select_multiple (request);
   GtkFileFilter *filter = webkit_file_chooser_request_get_mime_types_filter (request);
+  g_autoptr (GFile) current_folder = NULL;
+  g_autoptr (GError) error = NULL;
 
   dialog = ephy_create_file_chooser (_("Open"),
-                                     GTK_WIDGET (toplevel),
+                                     GTK_WIDGET (root),
                                      GTK_FILE_CHOOSER_ACTION_OPEN,
                                      EPHY_FILE_FILTER_ALL);
 
   if (filter) {
-    gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter);
-    gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (dialog), filter);
+    gtk_file_chooser_add_filter (dialog, filter);
+    gtk_file_chooser_set_filter (dialog, filter);
   }
 
-  gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), g_settings_get_string (EPHY_SETTINGS_WEB, 
EPHY_PREFS_WEB_LAST_UPLOAD_DIRECTORY));
-  gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (dialog), allows_multiple_selection);
+  current_folder = g_file_new_for_path (g_settings_get_string (EPHY_SETTINGS_WEB,
+                                                               EPHY_PREFS_WEB_LAST_UPLOAD_DIRECTORY));
+  gtk_file_chooser_set_current_folder (dialog, current_folder, &error);
+  if (error)
+    g_info ("Failed to set current folder to: %s", error->message);
+
+  gtk_file_chooser_set_select_multiple (dialog, allows_multiple_selection);
 
   g_signal_connect (dialog, "response",
                     G_CALLBACK (open_response_cb),
@@ -288,7 +305,7 @@ ephy_web_view_set_property (GObject      *object,
       break;
   }
 }
-
+/* FIXME the button one should be a controller, not sure about the key one
 static gboolean
 ephy_web_view_key_press_event (GtkWidget   *widget,
                                GdkEventKey *event)
@@ -310,10 +327,10 @@ static gboolean
 ephy_web_view_button_press_event (GtkWidget      *widget,
                                   GdkEventButton *event)
 {
-  /* These are the special cases WebkitWebView doesn't handle but we have an
-   * interest in handling. */
+  *//* These are the special cases WebkitWebView doesn't handle but we have an
+   * interest in handling. *//*
 
-  /* Handle typical back/forward mouse buttons. */
+  *//* Handle typical back/forward mouse buttons. *//*
   if (event->button == 8) {
     webkit_web_view_go_back (WEBKIT_WEB_VIEW (widget));
     return TRUE;
@@ -324,9 +341,18 @@ ephy_web_view_button_press_event (GtkWidget      *widget,
     return TRUE;
   }
 
-  /* Let WebKitWebView handle this. */
+  *//* Let WebKitWebView handle this. *//*
   return GTK_WIDGET_CLASS (ephy_web_view_parent_class)->button_press_event (widget, event);
 }
+*/
+
+static inline void
+remove_info_bar (GtkWidget *info_bar)
+{
+  EphyEmbed *embed = EPHY_EMBED (gtk_widget_get_ancestor (info_bar, EPHY_TYPE_EMBED));
+
+  ephy_embed_remove_top_widget (embed, info_bar);
+}
 
 static void
 untrack_info_bar (GtkWidget **tracked_info_bar)
@@ -336,7 +362,7 @@ untrack_info_bar (GtkWidget **tracked_info_bar)
 
   if (*tracked_info_bar) {
     g_object_remove_weak_pointer (G_OBJECT (*tracked_info_bar), (gpointer *)tracked_info_bar);
-    gtk_widget_destroy (*tracked_info_bar);
+    remove_info_bar (*tracked_info_bar);
     *tracked_info_bar = NULL;
   }
 }
@@ -362,7 +388,6 @@ ephy_web_view_create_form_auth_save_confirmation_info_bar (EphyWebView *web_view
                                                            const char  *username)
 {
   GtkWidget *info_bar;
-  GtkWidget *content_area;
   GtkWidget *label;
   char *message;
 
@@ -379,13 +404,11 @@ ephy_web_view_create_form_auth_save_confirmation_info_bar (EphyWebView *web_view
    */
   message = g_markup_printf_escaped (_("Do you want to save your password for “%s”?"), origin);
   gtk_label_set_markup (GTK_LABEL (label), message);
-  gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
+  gtk_label_set_wrap (GTK_LABEL (label), TRUE);
   gtk_label_set_xalign (GTK_LABEL (label), 0);
   g_free (message);
 
-  content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (info_bar));
-  gtk_container_add (GTK_CONTAINER (content_area), label);
-  gtk_widget_show (label);
+  gtk_info_bar_add_child (GTK_INFO_BAR (info_bar), label);
 
   track_info_bar (info_bar, &web_view->password_info_bar);
 
@@ -419,7 +442,7 @@ info_bar_save_request_response_cb (GtkInfoBar      *info_bar,
 {
   g_assert (data->callback);
   data->callback (response_id, data->callback_data);
-  gtk_widget_destroy (GTK_WIDGET (info_bar));
+  remove_info_bar (GTK_WIDGET (info_bar));
 }
 
 void
@@ -606,7 +629,6 @@ password_form_focused_cb (EphyEmbedShell *shell,
 {
   GtkWidget *info_bar;
   GtkWidget *label;
-  GtkWidget *content_area;
 
   if (web_view->password_form_info_bar)
     return;
@@ -617,15 +639,13 @@ password_form_focused_cb (EphyEmbedShell *shell,
 
   /* Translators: Message appears when insecure password form is focused. */
   label = gtk_label_new (_("Heads-up: this form is not secure. If you type your password, it will not be 
kept private."));
-  gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
+  gtk_label_set_wrap (GTK_LABEL (label), TRUE);
   gtk_label_set_xalign (GTK_LABEL (label), 0);
-  gtk_widget_show (label);
 
   info_bar = gtk_info_bar_new ();
   gtk_info_bar_set_message_type (GTK_INFO_BAR (info_bar), GTK_MESSAGE_WARNING);
   gtk_info_bar_set_show_close_button (GTK_INFO_BAR (info_bar), TRUE);
-  content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (info_bar));
-  gtk_container_add (GTK_CONTAINER (content_area), label);
+  gtk_info_bar_add_child (GTK_INFO_BAR (info_bar), label);
 
   g_signal_connect (info_bar, "response", G_CALLBACK (gtk_widget_hide), NULL);
 
@@ -634,7 +654,6 @@ password_form_focused_cb (EphyEmbedShell *shell,
   ephy_embed_add_top_widget (EPHY_GET_EMBED_FROM_EPHY_WEB_VIEW (web_view),
                              info_bar,
                              EPHY_EMBED_TOP_WIDGET_POLICY_DESTROY_ON_TRANSITION);
-  gtk_widget_show (info_bar);
 }
 
 static void
@@ -864,7 +883,7 @@ on_unresponsive_dialog_response (GtkDialog *dialog,
                                                                             
(GSourceFunc)unresponsive_process_timeout_cb,
                                                                             web_view,
                                                                             NULL);
-  g_clear_pointer (&web_view->unresponsive_process_dialog, gtk_widget_destroy);
+  g_clear_pointer (&web_view->unresponsive_process_dialog, gtk_window_destroy);
 }
 
 static gboolean
@@ -875,18 +894,19 @@ unresponsive_process_timeout_cb (gpointer user_data)
   if (!gtk_widget_get_mapped (GTK_WIDGET (web_view)))
     return G_SOURCE_CONTINUE;
 
-  web_view->unresponsive_process_dialog = gtk_message_dialog_new (GTK_WINDOW (gtk_widget_get_toplevel 
(GTK_WIDGET (web_view))),
-                                                                  GTK_DIALOG_MODAL | 
GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_USE_HEADER_BAR,
-                                                                  GTK_MESSAGE_QUESTION,
-                                                                  GTK_BUTTONS_NONE,
-                                                                  _("The current page '%s' is unresponsive"),
-                                                                  ephy_web_view_get_address (web_view));
+  web_view->unresponsive_process_dialog =
+    GTK_WINDOW (gtk_message_dialog_new (GTK_WINDOW (gtk_widget_get_root (GTK_WIDGET (web_view))),
+                                        GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT | 
GTK_DIALOG_USE_HEADER_BAR,
+                                        GTK_MESSAGE_QUESTION,
+                                        GTK_BUTTONS_NONE,
+                                        _("The current page '%s' is unresponsive"),
+                                        ephy_web_view_get_address (web_view)));
 
   gtk_dialog_add_button (GTK_DIALOG (web_view->unresponsive_process_dialog), _("_Wait"), GTK_RESPONSE_NO);
   gtk_dialog_add_button (GTK_DIALOG (web_view->unresponsive_process_dialog), _("_Kill"), GTK_RESPONSE_YES);
 
   g_signal_connect (web_view->unresponsive_process_dialog, "response", G_CALLBACK 
(on_unresponsive_dialog_response), web_view);
-  gtk_widget_show_all (web_view->unresponsive_process_dialog);
+  gtk_window_present (web_view->unresponsive_process_dialog);
 
   web_view->unresponsive_process_timeout_id = 0;
 
@@ -904,7 +924,7 @@ is_web_process_responsive_changed_cb (EphyWebView *web_view,
 
   if (web_view->unresponsive_process_dialog && responsive) {
     g_signal_handlers_disconnect_by_func (web_view->unresponsive_process_dialog, 
on_unresponsive_dialog_response, web_view);
-    g_clear_pointer (&web_view->unresponsive_process_dialog, gtk_widget_destroy);
+    g_clear_pointer (&web_view->unresponsive_process_dialog, gtk_window_destroy);
   }
 
   if (!responsive) {
@@ -1091,7 +1111,7 @@ decide_on_permission_request (GtkWidget             *info_bar,
   }
 
   g_object_weak_unref (G_OBJECT (info_bar), (GWeakNotify)permission_request_info_bar_destroyed_cb, data);
-  gtk_widget_destroy (info_bar);
+  remove_info_bar (info_bar);
   permission_request_data_free (data);
 }
 
@@ -1102,7 +1122,6 @@ show_permission_request_info_bar (WebKitWebView           *web_view,
 {
   PermissionRequestData *data;
   GtkWidget *info_bar;
-  GtkWidget *content_area;
   GtkWidget *label;
   char *message;
   char *origin;
@@ -1152,13 +1171,10 @@ show_permission_request_info_bar (WebKitWebView           *web_view,
 
   label = gtk_label_new (NULL);
   gtk_label_set_markup (GTK_LABEL (label), message);
-  gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
+  gtk_label_set_wrap (GTK_LABEL (label), TRUE);
   gtk_label_set_xalign (GTK_LABEL (label), 0);
 
-  content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (info_bar));
-  gtk_container_add (GTK_CONTAINER (content_area), label);
-
-  gtk_widget_show_all (info_bar);
+  gtk_info_bar_add_child (GTK_INFO_BAR (info_bar), label);
 
   data = permission_request_data_new (EPHY_WEB_VIEW (web_view), decision, origin);
 
@@ -1212,7 +1228,7 @@ decide_on_itp_permission_request (GtkWidget               *info_bar,
   }
 
   g_object_set_data (G_OBJECT (info_bar), "ephy-itp-decision", NULL);
-  gtk_widget_destroy (info_bar);
+  remove_info_bar (info_bar);
 }
 
 static void
@@ -1220,7 +1236,6 @@ ephy_web_view_show_itp_permission_info_bar (EphyWebView
                                             WebKitWebsiteDataAccessPermissionRequest *decision)
 {
   GtkWidget *info_bar;
-  GtkWidget *content_area;
   GtkWidget *box;
   GtkWidget *label;
   g_autofree char *message = NULL;
@@ -1241,21 +1256,17 @@ ephy_web_view_show_itp_permission_info_bar (EphyWebView
   markup = g_strdup_printf ("<span weight='bold'>%s</span>", message);
   label = gtk_label_new (NULL);
   gtk_label_set_markup (GTK_LABEL (label), markup);
-  gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
+  gtk_label_set_wrap (GTK_LABEL (label), TRUE);
   gtk_label_set_xalign (GTK_LABEL (label), 0);
-  gtk_container_add (GTK_CONTAINER (box), label);
-  gtk_widget_show (label);
+  gtk_box_append (GTK_BOX (box), label);
 
   secondary_message = g_strdup_printf (_("This will allow “%s” to track your activity."), requesting_domain);
   label = gtk_label_new (secondary_message);
-  gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
+  gtk_label_set_wrap (GTK_LABEL (label), TRUE);
   gtk_label_set_xalign (GTK_LABEL (label), 0);
-  gtk_container_add (GTK_CONTAINER (box), label);
-  gtk_widget_show (label);
+  gtk_box_append (GTK_BOX (box), label);
 
-  content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (info_bar));
-  gtk_container_add (GTK_CONTAINER (content_area), box);
-  gtk_widget_show (box);
+  gtk_info_bar_add_child (GTK_INFO_BAR (info_bar), box);
 
   track_info_bar (info_bar, &web_view->itp_info_bar);
 
@@ -1267,7 +1278,6 @@ ephy_web_view_show_itp_permission_info_bar (EphyWebView
   ephy_embed_add_top_widget (EPHY_GET_EMBED_FROM_EPHY_WEB_VIEW (web_view),
                              info_bar,
                              EPHY_EMBED_TOP_WIDGET_POLICY_DESTROY_ON_TRANSITION);
-  gtk_widget_show (info_bar);
 }
 
 static gboolean
@@ -1503,7 +1513,7 @@ update_security_status_for_committed_load (EphyWebView *view,
 {
   EphySecurityLevel security_level = EPHY_SECURITY_LEVEL_NO_SECURITY;
   EphyEmbed *embed = NULL;
-  GtkWidget *toplevel;
+  GtkRoot *root;
   WebKitWebContext *web_context;
   WebKitSecurityManager *security_manager;
   g_autoptr (GUri) guri = NULL;
@@ -1517,8 +1527,8 @@ update_security_status_for_committed_load (EphyWebView *view,
     return;
   }
 
-  toplevel = gtk_widget_get_toplevel (GTK_WIDGET (view));
-  if (EPHY_IS_EMBED_CONTAINER (toplevel))
+  root = gtk_widget_get_root (GTK_WIDGET (view));
+  if (EPHY_IS_EMBED_CONTAINER (root))
     embed = EPHY_GET_EMBED_FROM_EPHY_WEB_VIEW (view);
   web_context = webkit_web_view_get_context (WEBKIT_WEB_VIEW (view));
   security_manager = webkit_web_context_get_security_manager (web_context);
@@ -2511,15 +2521,15 @@ close_web_view_cb (WebKitWebView *web_view,
                    gpointer       user_data)
 
 {
-  GtkWidget *widget = gtk_widget_get_toplevel (GTK_WIDGET (web_view));
+  GtkRoot *root = gtk_widget_get_root (GTK_WIDGET (web_view));
 
   LOG ("close web view");
 
-  if (EPHY_IS_EMBED_CONTAINER (widget))
-    ephy_embed_container_remove_child (EPHY_EMBED_CONTAINER (widget),
+  if (EPHY_IS_EMBED_CONTAINER (root))
+    ephy_embed_container_remove_child (EPHY_EMBED_CONTAINER (root),
                                        EPHY_GET_EMBED_FROM_EPHY_WEB_VIEW (web_view));
   else
-    gtk_widget_destroy (widget);
+    gtk_window_destroy (GTK_WINDOW (root));
 }
 
 
@@ -2579,7 +2589,7 @@ enum_nick (GType enum_type,
 static void
 reader_setting_changed_cb (EphyWebView *web_view)
 {
-  HdyStyleManager *style_manager;
+  AdwStyleManager *style_manager;
   const gchar *font_style;
   const gchar *color_scheme;
   gchar *js_snippet;
@@ -2591,10 +2601,10 @@ reader_setting_changed_cb (EphyWebView *web_view)
                           g_settings_get_enum (EPHY_SETTINGS_READER,
                                                EPHY_PREFS_READER_FONT_STYLE));
 
-  style_manager = hdy_style_manager_get_default ();
+  style_manager = adw_style_manager_get_default ();
 
-  if (hdy_style_manager_get_system_supports_color_schemes (style_manager))
-    color_scheme = hdy_style_manager_get_dark (style_manager) ? "dark" : "light";
+  if (adw_style_manager_get_system_supports_color_schemes (style_manager))
+    color_scheme = adw_style_manager_get_dark (style_manager) ? "dark" : "light";
   else
     color_scheme = enum_nick (EPHY_TYPE_PREFS_READER_COLOR_SCHEME,
                               g_settings_get_enum (EPHY_SETTINGS_READER,
@@ -3585,26 +3595,29 @@ ephy_web_view_get_security_level (EphyWebView           *view,
     *errors = view->tls_errors;
 }
 
+static void
+info_bar_response_cb (GtkInfoBar *info_bar,
+                      int         response_id,
+                      EphyEmbed  *embed)
+{
+  ephy_embed_remove_top_widget (embed, GTK_WIDGET (info_bar));
+}
+
 static void
 ephy_web_view_print_failed (EphyWebView *view,
                             GError      *error)
 {
   GtkWidget *info_bar;
   GtkWidget *label;
-  GtkContainer *content_area;
   EphyEmbed *embed = EPHY_GET_EMBED_FROM_EPHY_WEB_VIEW (view);
 
   info_bar = gtk_info_bar_new_with_buttons (_("_OK"), GTK_RESPONSE_OK, NULL);
   label = gtk_label_new (error->message);
-  content_area = GTK_CONTAINER (gtk_info_bar_get_content_area (GTK_INFO_BAR (info_bar)));
 
-  gtk_info_bar_set_message_type (GTK_INFO_BAR (info_bar), GTK_MESSAGE_ERROR);
-  gtk_container_add (content_area, label);
-  g_signal_connect (info_bar, "response",
-                    G_CALLBACK (gtk_widget_destroy), NULL);
+  gtk_info_bar_add_child (GTK_INFO_BAR (info_bar), label);
+  g_signal_connect (info_bar, "response", G_CALLBACK (info_bar_response_cb), embed);
 
   ephy_embed_add_top_widget (embed, info_bar, EPHY_EMBED_TOP_WIDGET_POLICY_RETAIN_ON_TRANSITION);
-  gtk_widget_show_all (info_bar);
 }
 
 static void
@@ -3911,7 +3924,7 @@ ephy_web_view_dispose (GObject *object)
   g_clear_object (&view->certificate);
   g_clear_object (&view->file_monitor);
   g_clear_object (&view->icon);
-  g_clear_pointer (&view->unresponsive_process_dialog, gtk_widget_destroy);
+  g_clear_pointer (&view->unresponsive_process_dialog, gtk_window_destroy);
 
   if (view->cancellable) {
     g_cancellable_cancel (view->cancellable);
@@ -4001,12 +4014,12 @@ ephy_web_view_init (EphyWebView *web_view)
                            G_CALLBACK (reader_setting_changed_cb),
                            web_view, G_CONNECT_SWAPPED);
 
-  g_signal_connect_object (hdy_style_manager_get_default (),
+  g_signal_connect_object (adw_style_manager_get_default (),
                            "notify::system-supports-color-schemes",
                            G_CALLBACK (reader_setting_changed_cb),
                            web_view, G_CONNECT_SWAPPED);
 
-  g_signal_connect_object (hdy_style_manager_get_default (),
+  g_signal_connect_object (adw_style_manager_get_default (),
                            "notify::dark",
                            G_CALLBACK (reader_setting_changed_cb),
                            web_view, G_CONNECT_SWAPPED);
@@ -4095,7 +4108,7 @@ static void
 ephy_web_view_class_init (EphyWebViewClass *klass)
 {
   GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
-  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
+//  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
   WebKitWebViewClass *webkit_webview_class = WEBKIT_WEB_VIEW_CLASS (klass);
 
   gobject_class->dispose = ephy_web_view_dispose;
@@ -4104,8 +4117,8 @@ ephy_web_view_class_init (EphyWebViewClass *klass)
   gobject_class->set_property = ephy_web_view_set_property;
   gobject_class->constructed = ephy_web_view_constructed;
 
-  widget_class->button_press_event = ephy_web_view_button_press_event;
-  widget_class->key_press_event = ephy_web_view_key_press_event;
+//  widget_class->button_press_event = ephy_web_view_button_press_event;
+// FIXME  widget_class->key_press_event = ephy_web_view_key_press_event;
 
   webkit_webview_class->run_file_chooser = ephy_web_view_run_file_chooser;
 
diff --git a/embed/meson.build b/embed/meson.build
index 68d6ec447..7d94b9864 100644
--- a/embed/meson.build
+++ b/embed/meson.build
@@ -11,7 +11,7 @@ enums = gnome.mkenums_simple('ephy-embed-type-builtins',
 )
 
 libephyembed_sources = [
-  'contrib/gd-tagged-entry.c',
+#  'contrib/gd-tagged-entry.c',
   'ephy-about-handler.c',
   'ephy-downloads-manager.c',
   'ephy-download.c',
diff --git a/lib/ephy-file-helpers.c b/lib/ephy-file-helpers.c
index 8bc2a494d..33b9d5cf8 100644
--- a/lib/ephy-file-helpers.c
+++ b/lib/ephy-file-helpers.c
@@ -548,7 +548,6 @@ launch_application (GAppInfo *app,
   g_autoptr (GdkAppLaunchContext) context = NULL;
   g_autoptr (GError) error = NULL;
   GdkDisplay *display;
-  GdkScreen *screen;
   gboolean res;
 
   /* This is impossible to implement inside flatpak. Higher layers must
@@ -557,10 +556,8 @@ launch_application (GAppInfo *app,
   g_assert (!ephy_is_running_inside_flatpak ());
 
   display = gdk_display_get_default ();
-  screen = gdk_screen_get_default ();
 
   context = gdk_display_get_app_launch_context (display);
-  gdk_app_launch_context_set_screen (context, screen);
   gdk_app_launch_context_set_timestamp (context, user_time);
 
   res = g_app_info_launch (app, files,
@@ -665,7 +662,7 @@ static gboolean
 open_in_default_handler (const char                   *uri,
                          const char                   *mime_type,
                          guint32                       timestamp,
-                         GdkScreen                    *screen,
+                         GdkDisplay                   *display,
                          EphyFileHelpersNotFlatpakTag  tag)
 {
   g_autoptr (GdkAppLaunchContext) context = NULL;
@@ -679,8 +676,7 @@ open_in_default_handler (const char                   *uri,
   g_assert (tag == EPHY_FILE_HELPERS_I_UNDERSTAND_I_MUST_NOT_USE_THIS_FUNCTION_UNDER_FLATPAK);
   g_assert (!ephy_is_running_inside_flatpak ());
 
-  context = gdk_display_get_app_launch_context (screen ? gdk_screen_get_display (screen) : 
gdk_display_get_default ());
-  gdk_app_launch_context_set_screen (context, screen);
+  context = gdk_display_get_app_launch_context (display ? display : gdk_display_get_default ());
   gdk_app_launch_context_set_timestamp (context, timestamp);
 
   appinfo = g_app_info_get_default_for_type (mime_type, TRUE);
@@ -703,10 +699,10 @@ open_in_default_handler (const char                   *uri,
 gboolean
 ephy_file_open_uri_in_default_browser (const char                   *uri,
                                        guint32                       user_time,
-                                       GdkScreen                    *screen,
+                                       GdkDisplay                   *display,
                                        EphyFileHelpersNotFlatpakTag  tag)
 {
-  return open_in_default_handler (uri, "x-scheme-handler/http", user_time, screen, tag);
+  return open_in_default_handler (uri, "x-scheme-handler/http", user_time, display, tag);
 }
 
 /**
diff --git a/lib/ephy-file-helpers.h b/lib/ephy-file-helpers.h
index c09d145c8..1a9eb3b25 100644
--- a/lib/ephy-file-helpers.h
+++ b/lib/ephy-file-helpers.h
@@ -82,7 +82,7 @@ gboolean           ephy_file_launch_desktop_file            (const char
                                                              EphyFileHelpersNotFlatpakTag  tag);
 gboolean           ephy_file_open_uri_in_default_browser    (const char                   *uri,
                                                              guint32                       user_time,
-                                                             GdkScreen                    *screen,
+                                                             GdkDisplay                   *screen,
                                                              EphyFileHelpersNotFlatpakTag  tag);
 gboolean           ephy_file_browse_to                      (GFile                        *file,
                                                              guint32                       user_time);
diff --git a/lib/ephy-flatpak-utils.c b/lib/ephy-flatpak-utils.c
index 818af95f4..70dfca8e4 100644
--- a/lib/ephy-flatpak-utils.c
+++ b/lib/ephy-flatpak-utils.c
@@ -29,7 +29,7 @@
 #include <gio/gio.h>
 #include <gio/gunixfdlist.h>
 #if USE_LIBPORTAL
-#include <libportal/portal-gtk3.h>
+#include <libportal/portal-gtk4.h>
 #endif
 #include <string.h>
 #include <sys/stat.h>
diff --git a/lib/ephy-gui.c b/lib/ephy-gui.c
index c342b23a0..12c5cce22 100644
--- a/lib/ephy-gui.c
+++ b/lib/ephy-gui.c
@@ -53,7 +53,6 @@ void
 ephy_gui_help (GtkWidget  *parent,
                const char *page)
 {
-  GError *error = NULL;
   char *url;
 
   if (page)
@@ -61,27 +60,12 @@ ephy_gui_help (GtkWidget  *parent,
   else
     url = g_strdup ("help:epiphany");
 
-  gtk_show_uri_on_window (GTK_WINDOW (parent), url, gtk_get_current_event_time (), &error);
-
-  if (error != NULL) {
-    GtkWidget *dialog;
-
-    dialog = gtk_message_dialog_new (GTK_WINDOW (parent),
-                                     GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
-                                     GTK_MESSAGE_ERROR,
-                                     GTK_BUTTONS_OK,
-                                     _("Could not display help: %s"),
-                                     error->message);
-    g_error_free (error);
-
-    g_signal_connect (dialog, "response",
-                      G_CALLBACK (gtk_widget_destroy), NULL);
-    gtk_widget_show (dialog);
-  }
+  gtk_show_uri (GTK_WINDOW (parent), url, GDK_CURRENT_TIME);
 
   g_free (url);
 }
 
+#if 0
 void
 ephy_gui_get_current_event (GdkEventType *otype,
                             guint        *ostate,
@@ -119,3 +103,4 @@ ephy_gui_get_current_event (GdkEventType *otype,
   if (obutton)
     *obutton = button;
 }
+#endif
diff --git a/lib/ephy-notification-container.c b/lib/ephy-notification-container.c
index f0f31e736..8a02322f2 100644
--- a/lib/ephy-notification-container.c
+++ b/lib/ephy-notification-container.c
@@ -23,13 +23,13 @@
 #include "ephy-notification-container.h"
 
 struct _EphyNotificationContainer {
-  GtkBin parent_instance;
+  AdwBin parent_instance;
 
   GtkWidget *revealer;
   GtkWidget *box;
 };
 
-G_DEFINE_TYPE (EphyNotificationContainer, ephy_notification_container, GTK_TYPE_BIN);
+G_DEFINE_TYPE (EphyNotificationContainer, ephy_notification_container, ADW_TYPE_BIN);
 
 static EphyNotificationContainer *notification_container = NULL;
 
@@ -46,10 +46,12 @@ ephy_notification_container_init (EphyNotificationContainer *self)
   gtk_widget_set_valign (GTK_WIDGET (self), GTK_ALIGN_START);
 
   self->revealer = gtk_revealer_new ();
-  gtk_container_add (GTK_CONTAINER (self), self->revealer);
+  adw_bin_set_child (ADW_BIN (self), self->revealer);
 
   self->box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
-  gtk_container_add (GTK_CONTAINER (self->revealer), self->box);
+  gtk_revealer_set_child (GTK_REVEALER (self->revealer), self->box);
+
+  gtk_widget_hide (GTK_WIDGET (self));
 }
 
 static void
@@ -67,28 +69,13 @@ ephy_notification_container_get_default (void)
                        NULL);
 }
 
-static guint
-get_num_children (EphyNotificationContainer *self)
-{
-  GList *children;
-  guint retval;
-
-  g_assert (EPHY_IS_NOTIFICATION_CONTAINER (self));
-
-  children = gtk_container_get_children (GTK_CONTAINER (self->box));
-  retval = g_list_length (children);
-  g_list_free (children);
-
-  return retval;
-}
-
 static void
 notification_close_cb (EphyNotification          *notification,
                        EphyNotificationContainer *self)
 {
-  gtk_container_remove (GTK_CONTAINER (self->box), GTK_WIDGET (notification));
+  gtk_box_remove (GTK_BOX (self->box), GTK_WIDGET (notification));
 
-  if (get_num_children (self) == 0) {
+  if (!gtk_widget_get_first_child (self->box)) {
     gtk_widget_hide (GTK_WIDGET (self));
     gtk_revealer_set_reveal_child (GTK_REVEALER (self->revealer), FALSE);
   }
@@ -98,24 +85,24 @@ void
 ephy_notification_container_add_notification (EphyNotificationContainer *self,
                                               GtkWidget                 *notification)
 {
-  g_autoptr (GList) children = NULL;
-  GList *list;
+  GtkWidget *child;
 
   g_assert (EPHY_IS_NOTIFICATION_CONTAINER (self));
   g_assert (GTK_IS_WIDGET (notification));
 
-  children = gtk_container_get_children (GTK_CONTAINER (self->box));
-  for (list = children; list && list->data; list = list->next) {
-    EphyNotification *child_notification = EPHY_NOTIFICATION (children->data);
+  for (child = gtk_widget_get_first_child (self->box);
+       child;
+       child = gtk_widget_get_next_sibling (child)) {
+    EphyNotification *child_notification = EPHY_NOTIFICATION (child);
 
     if (ephy_notification_is_duplicate (child_notification, EPHY_NOTIFICATION (notification))) {
-      gtk_widget_destroy (notification);
+      gtk_box_remove (GTK_BOX (self->box), notification);
       return;
     }
   }
 
-  gtk_container_add (GTK_CONTAINER (self->box), notification);
-  gtk_widget_show_all (GTK_WIDGET (self));
+  gtk_box_append (GTK_BOX (self->box), notification);
+  gtk_widget_show (GTK_WIDGET (self));
   gtk_revealer_set_reveal_child (GTK_REVEALER (self->revealer), TRUE);
 
   g_signal_connect (notification, "close", G_CALLBACK (notification_close_cb), self);
diff --git a/lib/ephy-notification-container.h b/lib/ephy-notification-container.h
index 4444f83b7..df5fcdb36 100644
--- a/lib/ephy-notification-container.h
+++ b/lib/ephy-notification-container.h
@@ -20,13 +20,13 @@
 
 #pragma once
 
-#include <gtk/gtk.h>
+#include <adwaita.h>
 
 G_BEGIN_DECLS
 
 #define EPHY_TYPE_NOTIFICATION_CONTAINER (ephy_notification_container_get_type ())
 
-G_DECLARE_FINAL_TYPE (EphyNotificationContainer, ephy_notification_container, EPHY, NOTIFICATION_CONTAINER, 
GtkBin)
+G_DECLARE_FINAL_TYPE (EphyNotificationContainer, ephy_notification_container, EPHY, NOTIFICATION_CONTAINER, 
AdwBin)
 
 EphyNotificationContainer *ephy_notification_container_get_default      (void);
 
diff --git a/lib/ephy-notification.c b/lib/ephy-notification.c
index 38ccc8829..79d7022d5 100644
--- a/lib/ephy-notification.c
+++ b/lib/ephy-notification.c
@@ -24,7 +24,7 @@
 #include "ephy-notification-container.h"
 
 struct _EphyNotification {
-  GtkBin parent_instance;
+  AdwBin parent_instance;
 
   GtkWidget *grid;
 
@@ -49,7 +49,7 @@ enum {
 
 static guint signals[LAST_SIGNAL];
 
-G_DEFINE_TYPE (EphyNotification, ephy_notification, GTK_TYPE_BIN);
+G_DEFINE_TYPE (EphyNotification, ephy_notification, ADW_TYPE_BIN);
 
 static void
 ephy_notification_constructed (GObject *object)
@@ -125,37 +125,33 @@ close_button_clicked_cb (GtkButton        *button,
 static void
 ephy_notification_init (EphyNotification *self)
 {
-  GtkWidget *image;
-  GtkStyleContext *context;
-
-  self->grid = gtk_grid_new ();
-  context = gtk_widget_get_style_context (self->grid);
-  gtk_style_context_add_class (context, "app-notification");
-  gtk_container_add (GTK_CONTAINER (self), self->grid);
+  gtk_widget_add_css_class (GTK_WIDGET (self), "app-notification");
+  adw_bin_set_child (ADW_BIN (self), self->grid);
 
   self->head = gtk_label_new (NULL);
-  gtk_label_set_line_wrap (GTK_LABEL (self->head), TRUE);
+  gtk_label_set_wrap (GTK_LABEL (self->head), TRUE);
   gtk_widget_set_halign (self->head, GTK_ALIGN_CENTER);
   gtk_widget_set_hexpand (self->head, TRUE);
   gtk_grid_attach (GTK_GRID (self->grid), self->head, 0, 0, 1, 1);
 
   self->body = gtk_label_new (NULL);
-  gtk_label_set_line_wrap (GTK_LABEL (self->body), TRUE);
+  gtk_label_set_wrap (GTK_LABEL (self->body), TRUE);
   gtk_widget_set_halign (self->body, GTK_ALIGN_CENTER);
   gtk_widget_set_hexpand (self->body, TRUE);
   gtk_grid_attach (GTK_GRID (self->grid), self->body, 0, 1, 1, 1);
 
-  self->close_button = gtk_button_new ();
-  g_object_set (self->close_button,
-                "relief", GTK_RELIEF_NONE,
-                "focus-on-click", FALSE,
-                "margin", 6,
-                NULL);
+  self->close_button =
+    g_object_new (GTK_TYPE_BUTTON,
+                  "has-frame", FALSE,
+                  "focus-on-click", FALSE,
+                  "icon-name", "window-close-symbolic",
+                  "margin-top", 6,
+                  "margin-bottom", 6,
+                  "margin-start", 6,
+                  "margin-end", 6,
+                  NULL);
   gtk_grid_attach (GTK_GRID (self->grid), self->close_button, 1, 0, 1, 2);
 
-  image = gtk_image_new_from_icon_name ("window-close-symbolic", GTK_ICON_SIZE_BUTTON);
-  gtk_button_set_image (GTK_BUTTON (self->close_button), image);
-
   g_signal_connect (self->close_button,
                     "clicked",
                     G_CALLBACK (close_button_clicked_cb),
diff --git a/lib/ephy-notification.h b/lib/ephy-notification.h
index d3226cb68..5947cbcad 100644
--- a/lib/ephy-notification.h
+++ b/lib/ephy-notification.h
@@ -21,13 +21,13 @@
 #pragma once
 
 #include <glib-object.h>
-#include <gtk/gtk.h>
+#include <adwaita.h>
 
 G_BEGIN_DECLS
 
 #define EPHY_TYPE_NOTIFICATION (ephy_notification_get_type ())
 
-G_DECLARE_FINAL_TYPE (EphyNotification, ephy_notification, EPHY, NOTIFICATION, GtkBin)
+G_DECLARE_FINAL_TYPE (EphyNotification, ephy_notification, EPHY, NOTIFICATION, AdwBin)
 
 EphyNotification *ephy_notification_new  (const char *head,
                                           const char *body);
diff --git a/lib/meson.build b/lib/meson.build
index 015227f14..76e42cea4 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -10,42 +10,42 @@ enums = gnome.mkenums_simple('ephy-lib-type-builtins',
 )
 
 libephymisc_sources = [
-#  'contrib/gnome-languages.c',
-#  'ephy-debug.c',
+  'contrib/gnome-languages.c',
+  'ephy-debug.c',
 #  'ephy-dnd.c',
-#  'ephy-favicon-helpers.c',
-#  'ephy-file-helpers.c',
-#  'ephy-flatpak-utils.c',
-#  'ephy-gui.c',
-#  'ephy-langs.c',
-#  'ephy-notification.c',
-#  'ephy-notification-container.c',
-#  'ephy-permissions-manager.c',
-#  'ephy-profile-utils.c',
-#  'ephy-search-engine-manager.c',
-#  'ephy-security-levels.c',
-#  'ephy-settings.c',
-#  'ephy-signal-accumulator.c',
-#  'ephy-smaps.c',
-#  'ephy-snapshot-service.c',
-#  'ephy-sqlite-connection.c',
-#  'ephy-sqlite-statement.c',
-#  'ephy-string.c',
+  'ephy-favicon-helpers.c',
+  'ephy-file-helpers.c',
+  'ephy-flatpak-utils.c',
+  'ephy-gui.c',
+  'ephy-langs.c',
+  'ephy-notification.c',
+  'ephy-notification-container.c',
+  'ephy-permissions-manager.c',
+  'ephy-profile-utils.c',
+  'ephy-search-engine-manager.c',
+  'ephy-security-levels.c',
+  'ephy-settings.c',
+  'ephy-signal-accumulator.c',
+  'ephy-smaps.c',
+  'ephy-snapshot-service.c',
+  'ephy-sqlite-connection.c',
+  'ephy-sqlite-statement.c',
+  'ephy-string.c',
 #  'ephy-suggestion.c',
-#  'ephy-sync-utils.c',
-#  'ephy-time-helpers.c',
-#  'ephy-uri-helpers.c',
-#  'ephy-user-agent.c',
-#  'ephy-web-app-utils.c',
-#  'ephy-zoom.c',
-#  'history/ephy-history-service.c',
-#  'history/ephy-history-service-hosts-table.c',
-#  'history/ephy-history-service-urls-table.c',
-#  'history/ephy-history-service-visits-table.c',
-#  'history/ephy-history-types.c',
-#  'safe-browsing/ephy-gsb-service.c',
-#  'safe-browsing/ephy-gsb-storage.c',
-#  'safe-browsing/ephy-gsb-utils.c',
+  'ephy-sync-utils.c',
+  'ephy-time-helpers.c',
+  'ephy-uri-helpers.c',
+  'ephy-user-agent.c',
+  'ephy-web-app-utils.c',
+  'ephy-zoom.c',
+  'history/ephy-history-service.c',
+  'history/ephy-history-service-hosts-table.c',
+  'history/ephy-history-service-urls-table.c',
+  'history/ephy-history-service-visits-table.c',
+  'history/ephy-history-types.c',
+  'safe-browsing/ephy-gsb-service.c',
+  'safe-browsing/ephy-gsb-storage.c',
+  'safe-browsing/ephy-gsb-utils.c',
   enums
 ]
 
@@ -59,6 +59,7 @@ libephymisc_deps = [
   gsettings_desktop_schemas,
   gtk_dep,
   json_glib_dep,
+  libadwaita_dep,
   libsecret_dep,
   libsoup_dep,
   libxml_dep,
@@ -92,5 +93,5 @@ ephymisc_dep = declare_dependency(
   sources: enums
 )
 
-#subdir('sync')
-#subdir('widgets')
+subdir('sync')
+subdir('widgets')
diff --git a/lib/widgets/ephy-file-chooser.c b/lib/widgets/ephy-file-chooser.c
index 1b6dd213c..1ce5f8592 100644
--- a/lib/widgets/ephy-file-chooser.c
+++ b/lib/widgets/ephy-file-chooser.c
@@ -98,27 +98,28 @@ ephy_create_file_chooser (const char            *title,
                           GtkFileChooserAction   action,
                           EphyFileFilterDefault  default_filter)
 {
-  GtkWidget *toplevel_window = gtk_widget_get_toplevel (parent);
+  GtkRoot *root = gtk_widget_get_root (parent);
   GtkFileChooser *dialog;
   GtkFileFilter *filter[EPHY_FILE_FILTER_LAST];
-  g_autofree char *downloads_dir = NULL;
+  g_autofree char *downloads_dir_path = NULL;
+  g_autoptr (GFile) downloads_dir = NULL;
 
-  g_assert (GTK_IS_WINDOW (toplevel_window));
+  g_assert (GTK_IS_WINDOW (root));
   g_assert (default_filter >= 0 && default_filter <= EPHY_FILE_FILTER_LAST);
 
   dialog = GTK_FILE_CHOOSER (gtk_file_chooser_native_new (title,
-                                                          GTK_WINDOW (toplevel_window),
+                                                          GTK_WINDOW (root),
                                                           action,
                                                           NULL,
                                                           _("_Cancel")));
   gtk_native_dialog_set_modal (GTK_NATIVE_DIALOG (dialog), TRUE);
 
-  downloads_dir = ephy_file_get_downloads_dir ();
+  downloads_dir_path = ephy_file_get_downloads_dir ();
+  downloads_dir = g_file_new_for_path (downloads_dir_path);
   gtk_file_chooser_add_shortcut_folder (dialog, downloads_dir, NULL);
 
   if (action == GTK_FILE_CHOOSER_ACTION_OPEN ||
-      action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER ||
-      action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER) {
+      action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER) {
     gtk_file_chooser_native_set_accept_label (GTK_FILE_CHOOSER_NATIVE (dialog), _("_Open"));
   } else if (action == GTK_FILE_CHOOSER_ACTION_SAVE) {
     gtk_file_chooser_native_set_accept_label (GTK_FILE_CHOOSER_NATIVE (dialog), _("_Save"));
diff --git a/lib/widgets/meson.build b/lib/widgets/meson.build
index 5532e8c54..ada2e334b 100644
--- a/lib/widgets/meson.build
+++ b/lib/widgets/meson.build
@@ -1,23 +1,23 @@
-types_headers = [
-  'ephy-location-entry.h'
-]
+#types_headers = [
+#  'ephy-location-entry.h'
+#]
 
-enums = gnome.mkenums_simple('ephy-widgets-type-builtins',
-  sources: types_headers
-)
+#enums = gnome.mkenums_simple('ephy-widgets-type-builtins',
+#  sources: types_headers
+#)
 
 libephywidgets_sources = [
-  'contrib/nautilus-floating-bar.c',
-  'ephy-certificate-dialog.c',
-  'ephy-downloads-popover.c',
-  'ephy-downloads-progress-icon.c',
-  'ephy-download-widget.c',
+#  'contrib/nautilus-floating-bar.c',
+#  'ephy-certificate-dialog.c',
+#  'ephy-downloads-popover.c',
+#  'ephy-downloads-progress-icon.c',
+#  'ephy-download-widget.c',
   'ephy-file-chooser.c',
-  'ephy-location-entry.c',
-  'ephy-security-popover.c',
-  'ephy-title-box.c',
-  'ephy-title-widget.c',
-  enums
+#  'ephy-location-entry.c',
+#  'ephy-security-popover.c',
+#  'ephy-title-box.c',
+#  'ephy-title-widget.c',
+#  enums
 ]
 
 libephywidgets_deps = [
diff --git a/meson.build b/meson.build
index e7881d018..9a0189619 100644
--- a/meson.build
+++ b/meson.build
@@ -139,8 +139,8 @@ subdir('help')
 subdir('po')
 subdir('third-party')
 subdir('lib')
-#subdir('embed')
-#subdir('src')
+subdir('embed')
+subdir('src')
 #subdir('tests')
 
 meson.add_install_script('post_install.py')
diff --git a/src/ephy-action-bar-start.c b/src/ephy-action-bar-start.c
index feac717fe..dafe8bf09 100644
--- a/src/ephy-action-bar-start.c
+++ b/src/ephy-action-bar-start.c
@@ -43,7 +43,6 @@ struct _EphyActionBarStart {
   GtkWidget *navigation_back;
   GtkWidget *navigation_forward;
   GtkWidget *combined_stop_reload_button;
-  GtkWidget *combined_stop_reload_image;
   GtkWidget *homepage_button;
   GtkWidget *new_tab_button;
   GtkWidget *placeholder;
@@ -556,15 +555,12 @@ ephy_action_bar_start_constructed (GObject *object)
                     G_CALLBACK (new_tab_button_release_event_cb), action_bar_start);
 
   if (is_desktop_pantheon ()) {
-    gtk_button_set_image (GTK_BUTTON (action_bar_start->navigation_back),
-                          gtk_image_new_from_icon_name ("go-previous-symbolic",
-                                                        get_icon_size ()));
-    gtk_button_set_image (GTK_BUTTON (action_bar_start->navigation_forward),
-                          gtk_image_new_from_icon_name ("go-next-symbolic",
-                                                        get_icon_size ()));
-    gtk_button_set_image (GTK_BUTTON (action_bar_start->homepage_button),
-                          gtk_image_new_from_icon_name ("go-home-symbolic",
-                                                        get_icon_size ()));
+    gtk_button_set_icon_name (GTK_BUTTON (action_bar_start->navigation_back),
+                              "go-previous-symbolic");
+    gtk_button_set_icon_name (GTK_BUTTON (action_bar_start->navigation_forward),
+                              "go-next-symbolic");
+    gtk_button_set_icon_name (GTK_BUTTON (action_bar_start->homepage_button),
+                              "go-home-symbolic");
   }
 
   if (ephy_profile_dir_is_web_application ()) {
@@ -598,9 +594,6 @@ ephy_action_bar_start_class_init (EphyActionBarStartClass *klass)
   gtk_widget_class_bind_template_child (widget_class,
                                         EphyActionBarStart,
                                         combined_stop_reload_button);
-  gtk_widget_class_bind_template_child (widget_class,
-                                        EphyActionBarStart,
-                                        combined_stop_reload_image);
   gtk_widget_class_bind_template_child (widget_class,
                                         EphyActionBarStart,
                                         homepage_button);
@@ -635,16 +628,14 @@ ephy_action_bar_start_change_combined_stop_reload_state (EphyActionBarStart *act
                                                          gboolean            loading)
 {
   if (loading) {
-    gtk_image_set_from_icon_name (GTK_IMAGE (action_bar_start->combined_stop_reload_image),
-                                  "process-stop-symbolic",
-                                  get_icon_size ());
+    gtk_button_set_icon_name (GTK_BUTTON (action_bar_start->combined_stop_reload_button),
+                              "process-stop-symbolic");
     /* Translators: tooltip for the stop button */
     gtk_widget_set_tooltip_text (action_bar_start->combined_stop_reload_button,
                                  _("Stop loading the current page"));
   } else {
-    gtk_image_set_from_icon_name (GTK_IMAGE (action_bar_start->combined_stop_reload_image),
-                                  "view-refresh-symbolic",
-                                  get_icon_size ());
+    gtk_button_set_icon_name (GTK_BUTTON (action_bar_start->combined_stop_reload_button),
+                              "view-refresh-symbolic");
     gtk_widget_set_tooltip_text (action_bar_start->combined_stop_reload_button,
                                  _(REFRESH_BUTTON_TOOLTIP));
   }
diff --git a/src/ephy-action-bar.c b/src/ephy-action-bar.c
index 0245b6dc5..c9e32bb98 100644
--- a/src/ephy-action-bar.c
+++ b/src/ephy-action-bar.c
@@ -37,7 +37,7 @@ enum {
 static GParamSpec *object_properties[N_PROPERTIES] = { NULL, };
 
 struct _EphyActionBar {
-  GtkBin parent_instance;
+  AdwBin parent_instance;
 
   EphyWindow *window;
   GtkRevealer *revealer;
@@ -49,7 +49,7 @@ struct _EphyActionBar {
   gboolean can_reveal;
 };
 
-G_DEFINE_TYPE (EphyActionBar, ephy_action_bar, GTK_TYPE_BIN)
+G_DEFINE_TYPE (EphyActionBar, ephy_action_bar, ADW_TYPE_BIN)
 
 static void
 sync_chromes_visibility (EphyActionBar *action_bar)
diff --git a/src/ephy-action-bar.h b/src/ephy-action-bar.h
index bf0309b4a..b261fd1f2 100644
--- a/src/ephy-action-bar.h
+++ b/src/ephy-action-bar.h
@@ -21,7 +21,7 @@
 
 #pragma once
 
-#include <gtk/gtk.h>
+#include <adwaita.h>
 
 #include "ephy-action-bar-end.h"
 #include "ephy-action-bar-start.h"
@@ -32,7 +32,7 @@ G_BEGIN_DECLS
 
 #define EPHY_TYPE_ACTION_BAR (ephy_action_bar_get_type ())
 
-G_DECLARE_FINAL_TYPE (EphyActionBar, ephy_action_bar, EPHY, ACTION_BAR, GtkBin);
+G_DECLARE_FINAL_TYPE (EphyActionBar, ephy_action_bar, EPHY, ACTION_BAR, AdwBin);
 
 EphyActionBar      *ephy_action_bar_new                  (EphyWindow *window);
 EphyActionBarStart *ephy_action_bar_get_action_bar_start (EphyActionBar *action_bar);
diff --git a/src/ephy-desktop-utils.c b/src/ephy-desktop-utils.c
index 732f72ac2..d7e043a6d 100644
--- a/src/ephy-desktop-utils.c
+++ b/src/ephy-desktop-utils.c
@@ -46,15 +46,6 @@ is_desktop_gnome (void)
   return strstr (xdg_current_desktop, "GNOME") != NULL;
 }
 
-GtkIconSize
-get_icon_size (void)
-{
-  if (is_desktop_pantheon ())
-    return GTK_ICON_SIZE_LARGE_TOOLBAR;
-
-  return GTK_ICON_SIZE_BUTTON;
-}
-
 const char *
 ephy_get_fallback_favicon_name (const char      *uri,
                                 EphyFaviconType  type)
diff --git a/src/ephy-desktop-utils.h b/src/ephy-desktop-utils.h
index c162f3f5a..f30134aac 100644
--- a/src/ephy-desktop-utils.h
+++ b/src/ephy-desktop-utils.h
@@ -33,8 +33,6 @@ typedef enum {
 gboolean is_desktop_pantheon (void);
 gboolean is_desktop_gnome (void);
 
-GtkIconSize get_icon_size (void);
-
 const char *ephy_get_fallback_favicon_name (const char *title, EphyFaviconType type);
 
 G_END_DECLS
diff --git a/src/ephy-fullscreen-box.c b/src/ephy-fullscreen-box.c
index 397067ad7..c27cdf092 100644
--- a/src/ephy-fullscreen-box.c
+++ b/src/ephy-fullscreen-box.c
@@ -21,17 +21,15 @@
 #include "config.h"
 #include "ephy-fullscreen-box.h"
 
-#include <handy.h>
+#include <adwaita.h>
 
 #define FULLSCREEN_HIDE_DELAY 300
 #define SHOW_HEADERBAR_DISTANCE_PX 5
 
 struct _EphyFullscreenBox {
-  GtkEventBox parent_instance;
+  GtkWidget parent_instance;
 
-  HdyFlap *flap;
-  GtkEventController *controller;
-  GtkGesture *gesture;
+  AdwFlap *flap;
 
   gboolean fullscreen;
   gboolean autohide;
@@ -45,7 +43,7 @@ struct _EphyFullscreenBox {
 
 static void ephy_fullscreen_box_buildable_init (GtkBuildableIface *iface);
 
-G_DEFINE_TYPE_WITH_CODE (EphyFullscreenBox, ephy_fullscreen_box, GTK_TYPE_EVENT_BOX,
+G_DEFINE_TYPE_WITH_CODE (EphyFullscreenBox, ephy_fullscreen_box, GTK_TYPE_WIDGET,
                          G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE,
                                                 ephy_fullscreen_box_buildable_init))
 
@@ -54,6 +52,7 @@ enum {
   PROP_FULLSCREEN,
   PROP_AUTOHIDE,
   PROP_TITLEBAR,
+  PROP_CONTENT,
   PROP_REVEALED,
   LAST_PROP
 };
@@ -65,7 +64,7 @@ show_ui (EphyFullscreenBox *self)
 {
   g_clear_handle_id (&self->timeout_id, g_source_remove);
 
-  hdy_flap_set_reveal_flap (self->flap, TRUE);
+  adw_flap_set_reveal_flap (self->flap, TRUE);
 }
 
 static void
@@ -76,7 +75,7 @@ hide_ui (EphyFullscreenBox *self)
   if (!self->fullscreen)
     return;
 
-  hdy_flap_set_reveal_flap (self->flap, FALSE);
+  adw_flap_set_reveal_flap (self->flap, FALSE);
   gtk_widget_grab_focus (GTK_WIDGET (self->flap));
 }
 
@@ -93,7 +92,7 @@ hide_timeout_cb (EphyFullscreenBox *self)
 static void
 start_hide_timeout (EphyFullscreenBox *self)
 {
-  if (!hdy_flap_get_reveal_flap (self->flap))
+  if (!adw_flap_get_reveal_flap (self->flap))
     return;
 
   if (self->timeout_id)
@@ -118,12 +117,9 @@ is_descendant_of (GtkWidget *widget,
 
   parent = widget;
 
-  while (parent && parent != target && !GTK_IS_POPOVER (parent))
+  while (parent && parent != target)
     parent = gtk_widget_get_parent (parent);
 
-  if (GTK_IS_POPOVER (parent))
-    return is_descendant_of (gtk_popover_get_relative_to (GTK_POPOVER (parent)), target);
-
   return parent == target;
 }
 
@@ -132,8 +128,8 @@ get_titlebar_area_height (EphyFullscreenBox *self)
 {
   gdouble height;
 
-  height = gtk_widget_get_allocated_height (hdy_flap_get_flap (self->flap));
-  height *= hdy_flap_get_reveal_progress (self->flap);
+  height = gtk_widget_get_allocated_height (adw_flap_get_flap (self->flap));
+  height *= adw_flap_get_reveal_progress (self->flap);
   height = MAX (height, SHOW_HEADERBAR_DISTANCE_PX);
 
   return height;
@@ -153,7 +149,7 @@ update (EphyFullscreenBox *self,
   }
 
   if (self->last_focus && is_descendant_of (self->last_focus,
-                                            hdy_flap_get_flap (self->flap)))
+                                            adw_flap_get_flap (self->flap)))
     show_ui (self);
   else if (hide_immediately)
     hide_ui (self);
@@ -177,12 +173,6 @@ enter_cb (EphyFullscreenBox *self,
           double             x,
           double             y)
 {
-  g_autoptr (GdkEvent) event = gtk_get_current_event ();
-
-  if (event->crossing.window != gtk_widget_get_window (GTK_WIDGET (self)) ||
-      event->crossing.detail == GDK_NOTIFY_INFERIOR)
-    return;
-
   motion_cb (self, x, y);
 }
 
@@ -190,9 +180,10 @@ static void
 press_cb (EphyFullscreenBox *self,
           int                n_press,
           double             x,
-          double             y)
+          double             y,
+          GtkGesture        *gesture)
 {
-  gtk_gesture_set_state (self->gesture, GTK_EVENT_SEQUENCE_DENIED);
+  gtk_gesture_set_state (gesture, GTK_EVENT_SEQUENCE_DENIED);
 
   self->is_touch = TRUE;
 
@@ -216,72 +207,38 @@ notify_reveal_cb (EphyFullscreenBox *self)
 }
 
 static void
-ephy_fullscreen_box_hierarchy_changed (GtkWidget *widget,
-                                       GtkWidget *previous_toplevel)
+ephy_fullscreen_box_root (GtkWidget *widget)
 {
   EphyFullscreenBox *self = EPHY_FULLSCREEN_BOX (widget);
-  GtkWidget *toplevel;
+  GtkRoot *root;
 
-  if (previous_toplevel && GTK_IS_WINDOW (previous_toplevel))
-    g_signal_handlers_disconnect_by_func (previous_toplevel, set_focus_cb, widget);
+  GTK_WIDGET_CLASS (ephy_fullscreen_box_parent_class)->root (widget);
 
-  toplevel = gtk_widget_get_toplevel (widget);
+  root = gtk_widget_get_root (widget);
 
-  if (toplevel && GTK_IS_WINDOW (toplevel)) {
-    g_signal_connect_object (toplevel, "set-focus",
-                             G_CALLBACK (set_focus_cb), widget,
-                             G_CONNECT_SWAPPED);
+  if (root && GTK_IS_WINDOW (root)) {
+//    g_signal_connect_object (root, "set-focus",
+//                             G_CALLBACK (set_focus_cb), widget,
+//                             G_CONNECT_SWAPPED);
 
-    set_focus_cb (self, gtk_window_get_focus (GTK_WINDOW (toplevel)));
+    set_focus_cb (self, gtk_window_get_focus (GTK_WINDOW (root)));
   } else {
     set_focus_cb (self, NULL);
   }
 }
 
 static void
-ephy_fullscreen_box_add (GtkContainer *container,
-                         GtkWidget    *widget)
-{
-  EphyFullscreenBox *self = EPHY_FULLSCREEN_BOX (container);
-
-  if (!self->flap)
-    GTK_CONTAINER_CLASS (ephy_fullscreen_box_parent_class)->add (container, widget);
-  else
-    gtk_container_add (GTK_CONTAINER (self->flap), widget);
-}
-
-static void
-ephy_fullscreen_box_remove (GtkContainer *container,
-                            GtkWidget    *widget)
+ephy_fullscreen_box_unroot (GtkWidget *widget)
 {
-  EphyFullscreenBox *self = EPHY_FULLSCREEN_BOX (container);
+  EphyFullscreenBox *self = EPHY_FULLSCREEN_BOX (widget);
+  GtkRoot *root = gtk_widget_get_root (widget);
 
-  if (widget == GTK_WIDGET (self->flap)) {
-    GTK_CONTAINER_CLASS (ephy_fullscreen_box_parent_class)->remove (container, widget);
-    self->flap = NULL;
-  } else {
-    gtk_container_remove (GTK_CONTAINER (self->flap), widget);
-  }
-}
+  if (root && GTK_IS_WINDOW (root))
+    g_signal_handlers_disconnect_by_func (root, set_focus_cb, widget);
 
-static void
-ephy_fullscreen_box_forall (GtkContainer *container,
-                            gboolean      include_internals,
-                            GtkCallback   callback,
-                            gpointer      callback_data)
-{
-  EphyFullscreenBox *self = EPHY_FULLSCREEN_BOX (container);
+  set_focus_cb (self, NULL);
 
-  if (include_internals) {
-    GTK_CONTAINER_CLASS (ephy_fullscreen_box_parent_class)->forall (container,
-                                                                    include_internals,
-                                                                    callback,
-                                                                    callback_data);
-  } else {
-    gtk_container_foreach (GTK_CONTAINER (self->flap),
-                           callback,
-                           callback_data);
-  }
+  GTK_WIDGET_CLASS (ephy_fullscreen_box_parent_class)->unroot (widget);
 }
 
 static void
@@ -305,8 +262,12 @@ ephy_fullscreen_box_get_property (GObject    *object,
       g_value_set_object (value, ephy_fullscreen_box_get_titlebar (self));
       break;
 
+    case PROP_CONTENT:
+      g_value_set_object (value, ephy_fullscreen_box_get_content (self));
+      break;
+
     case PROP_REVEALED:
-      g_value_set_boolean (value, hdy_flap_get_reveal_flap (self->flap));
+      g_value_set_boolean (value, adw_flap_get_reveal_flap (self->flap));
       break;
 
     default:
@@ -335,6 +296,10 @@ ephy_fullscreen_box_set_property (GObject      *object,
       ephy_fullscreen_box_set_titlebar (self, g_value_get_object (value));
       break;
 
+    case PROP_CONTENT:
+      ephy_fullscreen_box_set_content (self, g_value_get_object (value));
+      break;
+
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
   }
@@ -345,8 +310,7 @@ ephy_fullscreen_box_dispose (GObject *object)
 {
   EphyFullscreenBox *self = EPHY_FULLSCREEN_BOX (object);
 
-  g_clear_object (&self->controller);
-  g_clear_object (&self->gesture);
+  g_clear_pointer ((GtkWidget **) &self->flap, gtk_widget_unparent);
 
   G_OBJECT_CLASS (ephy_fullscreen_box_parent_class)->dispose (object);
 }
@@ -356,17 +320,13 @@ ephy_fullscreen_box_class_init (EphyFullscreenBoxClass *klass)
 {
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
   GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
-  GtkContainerClass *container_class = GTK_CONTAINER_CLASS (klass);
 
   object_class->get_property = ephy_fullscreen_box_get_property;
   object_class->set_property = ephy_fullscreen_box_set_property;
   object_class->dispose = ephy_fullscreen_box_dispose;
 
-  widget_class->hierarchy_changed = ephy_fullscreen_box_hierarchy_changed;
-
-  container_class->add = ephy_fullscreen_box_add;
-  container_class->remove = ephy_fullscreen_box_remove;
-  container_class->forall = ephy_fullscreen_box_forall;
+  widget_class->root = ephy_fullscreen_box_root;
+  widget_class->unroot = ephy_fullscreen_box_unroot;
 
   props[PROP_FULLSCREEN] =
     g_param_spec_boolean ("fullscreen",
@@ -389,6 +349,13 @@ ephy_fullscreen_box_class_init (EphyFullscreenBoxClass *klass)
                          GTK_TYPE_WIDGET,
                          G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
 
+  props[PROP_CONTENT] =
+    g_param_spec_object ("content",
+                         "Content",
+                         "Content",
+                         GTK_TYPE_WIDGET,
+                         G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS);
+
   props[PROP_REVEALED] =
     g_param_spec_boolean ("revealed",
                           "Revealed",
@@ -399,47 +366,49 @@ ephy_fullscreen_box_class_init (EphyFullscreenBoxClass *klass)
   g_object_class_install_properties (object_class, LAST_PROP, props);
 
   gtk_widget_class_set_css_name (widget_class, "fullscreenbox");
+  gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT);
 }
 
 static void
 ephy_fullscreen_box_init (EphyFullscreenBox *self)
 {
-  HdyFlap *flap;
+  AdwFlap *flap;
+  GtkEventController *controller;
+  GtkGesture *gesture;
 
   self->autohide = TRUE;
 
-  gtk_widget_add_events (GTK_WIDGET (self), GDK_ALL_EVENTS_MASK);
-
-  flap = HDY_FLAP (hdy_flap_new ());
+  flap = ADW_FLAP (adw_flap_new ());
   gtk_orientable_set_orientation (GTK_ORIENTABLE (flap), GTK_ORIENTATION_VERTICAL);
-  hdy_flap_set_flap_position (flap, GTK_PACK_START);
-  hdy_flap_set_fold_policy (flap, HDY_FLAP_FOLD_POLICY_NEVER);
-  hdy_flap_set_locked (flap, TRUE);
-  hdy_flap_set_modal (flap, FALSE);
-  hdy_flap_set_swipe_to_open (flap, FALSE);
-  hdy_flap_set_swipe_to_close (flap, FALSE);
-  hdy_flap_set_transition_type (flap, HDY_FLAP_TRANSITION_TYPE_OVER);
-  gtk_widget_show (GTK_WIDGET (flap));
+  adw_flap_set_flap_position (flap, GTK_PACK_START);
+  adw_flap_set_fold_policy (flap, ADW_FLAP_FOLD_POLICY_NEVER);
+  adw_flap_set_locked (flap, TRUE);
+  adw_flap_set_modal (flap, FALSE);
+  adw_flap_set_swipe_to_open (flap, FALSE);
+  adw_flap_set_swipe_to_close (flap, FALSE);
+  adw_flap_set_transition_type (flap, ADW_FLAP_TRANSITION_TYPE_OVER);
 
   g_signal_connect_object (flap, "notify::reveal-flap",
                            G_CALLBACK (notify_reveal_cb), self, G_CONNECT_SWAPPED);
 
-  gtk_container_add (GTK_CONTAINER (self), GTK_WIDGET (flap));
+  gtk_widget_set_parent (GTK_WIDGET (flap), GTK_WIDGET (self));
   self->flap = flap;
 
-  self->controller = gtk_event_controller_motion_new (GTK_WIDGET (self));
-  gtk_event_controller_set_propagation_phase (self->controller, GTK_PHASE_CAPTURE);
-  g_signal_connect_object (self->controller, "enter",
+  controller = gtk_event_controller_motion_new ();
+  gtk_event_controller_set_propagation_phase (controller, GTK_PHASE_CAPTURE);
+  g_signal_connect_object (controller, "enter",
                            G_CALLBACK (enter_cb), self, G_CONNECT_SWAPPED);
-  g_signal_connect_object (self->controller, "motion",
+  g_signal_connect_object (controller, "motion",
                            G_CALLBACK (motion_cb), self, G_CONNECT_SWAPPED);
+  gtk_widget_add_controller (GTK_WIDGET (self), controller);
 
-  self->gesture = gtk_gesture_multi_press_new (GTK_WIDGET (self));
-  gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (self->gesture),
+  gesture = gtk_gesture_click_new ();
+  gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (gesture),
                                               GTK_PHASE_CAPTURE);
-  gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (self->gesture), TRUE);
-  g_signal_connect_object (self->gesture, "pressed",
+  gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (gesture), TRUE);
+  g_signal_connect_object (gesture, "pressed",
                            G_CALLBACK (press_cb), self, G_CONNECT_SWAPPED);
+  gtk_widget_add_controller (GTK_WIDGET (self), GTK_EVENT_CONTROLLER (gesture));
 }
 
 static void
@@ -450,15 +419,10 @@ ephy_fullscreen_box_buildable_add_child (GtkBuildable *buildable,
 {
   EphyFullscreenBox *self = EPHY_FULLSCREEN_BOX (buildable);
 
-  if (!self->flap) {
-    gtk_container_add (GTK_CONTAINER (self), GTK_WIDGET (child));
-    return;
-  }
-
   if (!g_strcmp0 (type, "titlebar"))
     ephy_fullscreen_box_set_titlebar (self, GTK_WIDGET (child));
   else
-    gtk_container_add (GTK_CONTAINER (self), GTK_WIDGET (child));
+    ephy_fullscreen_box_set_content (self, GTK_WIDGET (child));
 }
 
 static void
@@ -498,10 +462,10 @@ ephy_fullscreen_box_set_fullscreen (EphyFullscreenBox *self,
     return;
 
   if (fullscreen) {
-    hdy_flap_set_fold_policy (self->flap, HDY_FLAP_FOLD_POLICY_ALWAYS);
+    adw_flap_set_fold_policy (self->flap, ADW_FLAP_FOLD_POLICY_ALWAYS);
     update (self, FALSE);
   } else {
-    hdy_flap_set_fold_policy (self->flap, HDY_FLAP_FOLD_POLICY_NEVER);
+    adw_flap_set_fold_policy (self->flap, ADW_FLAP_FOLD_POLICY_NEVER);
     show_ui (self);
   }
 
@@ -545,7 +509,7 @@ ephy_fullscreen_box_get_titlebar (EphyFullscreenBox *self)
 {
   g_return_val_if_fail (EPHY_IS_FULLSCREEN_BOX (self), NULL);
 
-  return hdy_flap_get_flap (self->flap);
+  return adw_flap_get_flap (self->flap);
 }
 
 void
@@ -553,12 +517,35 @@ ephy_fullscreen_box_set_titlebar (EphyFullscreenBox *self,
                                   GtkWidget         *titlebar)
 {
   g_return_if_fail (EPHY_IS_FULLSCREEN_BOX (self));
-  g_return_if_fail (GTK_IS_WIDGET (titlebar) || titlebar == NULL);
+  g_return_if_fail (titlebar == NULL || GTK_IS_WIDGET (titlebar));
 
-  if (hdy_flap_get_flap (self->flap) == titlebar)
+  if (adw_flap_get_flap (self->flap) == titlebar)
     return;
 
-  hdy_flap_set_flap (self->flap, titlebar);
+  adw_flap_set_flap (self->flap, titlebar);
 
   g_object_notify_by_pspec (G_OBJECT (self), props[PROP_TITLEBAR]);
 }
+
+GtkWidget *
+ephy_fullscreen_box_get_content (EphyFullscreenBox *self)
+{
+  g_return_val_if_fail (EPHY_IS_FULLSCREEN_BOX (self), NULL);
+
+  return adw_flap_get_content (self->flap);
+}
+
+void
+ephy_fullscreen_box_set_content (EphyFullscreenBox *self,
+                                 GtkWidget         *content)
+{
+  g_return_if_fail (EPHY_IS_FULLSCREEN_BOX (self));
+  g_return_if_fail (content == NULL || GTK_IS_WIDGET (content));
+
+  if (adw_flap_get_content (self->flap) == content)
+    return;
+
+  adw_flap_set_content (self->flap, content);
+
+  g_object_notify_by_pspec (G_OBJECT (self), props[PROP_CONTENT]);
+}
diff --git a/src/ephy-fullscreen-box.h b/src/ephy-fullscreen-box.h
index 55a1ad93b..f8122bfa4 100644
--- a/src/ephy-fullscreen-box.h
+++ b/src/ephy-fullscreen-box.h
@@ -26,7 +26,7 @@ G_BEGIN_DECLS
 
 #define EPHY_TYPE_FULLSCREEN_BOX (ephy_fullscreen_box_get_type())
 
-G_DECLARE_FINAL_TYPE (EphyFullscreenBox, ephy_fullscreen_box, EPHY, FULLSCREEN_BOX, GtkEventBox)
+G_DECLARE_FINAL_TYPE (EphyFullscreenBox, ephy_fullscreen_box, EPHY, FULLSCREEN_BOX, GtkWidget)
 
 EphyFullscreenBox *ephy_fullscreen_box_new            (void);
 
@@ -42,4 +42,8 @@ GtkWidget         *ephy_fullscreen_box_get_titlebar   (EphyFullscreenBox *self);
 void               ephy_fullscreen_box_set_titlebar   (EphyFullscreenBox *self,
                                                        GtkWidget        *titlebar);
 
+GtkWidget         *ephy_fullscreen_box_get_content    (EphyFullscreenBox *self);
+void               ephy_fullscreen_box_set_content    (EphyFullscreenBox *self,
+                                                       GtkWidget         *content);
+
 G_END_DECLS
diff --git a/src/ephy-header-bar.c b/src/ephy-header-bar.c
index 14e993782..427183d4a 100644
--- a/src/ephy-header-bar.c
+++ b/src/ephy-header-bar.c
@@ -65,7 +65,6 @@ struct _EphyHeaderBar {
   GtkWidget *zoom_level_label;
   GtkWidget *restore_button;
   GtkWidget *combined_stop_reload_button;
-  GtkWidget *combined_stop_reload_image;
   GtkWidget *page_menu_popover;
 
   guint popover_hide_timeout_id;
@@ -276,8 +275,7 @@ ephy_header_bar_constructed (GObject *object)
   }
 
   /* Fullscreen restore button */
-  header_bar->restore_button = gtk_button_new_from_icon_name ("view-restore-symbolic",
-                                                              GTK_ICON_SIZE_BUTTON);
+  header_bar->restore_button = gtk_button_new_from_icon_name ("view-restore-symbolic");
   gtk_widget_set_valign (header_bar->restore_button, GTK_ALIGN_CENTER);
   g_signal_connect_object (header_bar->restore_button, "clicked",
                            G_CALLBACK (restore_button_clicked_cb),
@@ -288,8 +286,7 @@ ephy_header_bar_constructed (GObject *object)
   /* Page Menu */
   button = gtk_menu_button_new ();
   header_bar->page_menu_button = button;
-  gtk_button_set_image (GTK_BUTTON (button),
-                        gtk_image_new_from_icon_name ("open-menu-symbolic", GTK_ICON_SIZE_BUTTON));
+  gtk_menu_button_set_icon_name (GTK_MENU_BUTTON (button), "open-menu-symbolic");
   gtk_widget_set_valign (button, GTK_ALIGN_CENTER);
   g_type_ensure (G_TYPE_THEMED_ICON);
   builder = gtk_builder_new_from_resource ("/org/gnome/epiphany/gtk/page-menu-popover.ui");
@@ -325,7 +322,6 @@ ephy_header_bar_constructed (GObject *object)
   }
 
   header_bar->combined_stop_reload_button = GTK_WIDGET (gtk_builder_get_object (builder, 
"combined_stop_reload_button"));
-  header_bar->combined_stop_reload_image = GTK_WIDGET (gtk_builder_get_object (builder, 
"combined_stop_reload_image"));
   gtk_widget_set_tooltip_text (header_bar->combined_stop_reload_button, _(REFRESH_BUTTON_TOOLTIP));
 
   if (is_desktop_pantheon ()) {
@@ -479,16 +475,14 @@ ephy_header_bar_start_change_combined_stop_reload_state (EphyHeaderBar *header_b
                                                          gboolean       loading)
 {
   if (loading) {
-    gtk_image_set_from_icon_name (GTK_IMAGE (header_bar->combined_stop_reload_image),
-                                  "process-stop-symbolic",
-                                  get_icon_size ());
+    gtk_button_set_icon_name (GTK_BUTTON (header_bar->combined_stop_reload_image),
+                              "process-stop-symbolic");
     /* Translators: tooltip for the stop button */
     gtk_widget_set_tooltip_text (header_bar->combined_stop_reload_button,
                                  _("Stop loading the current page"));
   } else {
-    gtk_image_set_from_icon_name (GTK_IMAGE (header_bar->combined_stop_reload_image),
-                                  "view-refresh-symbolic",
-                                  get_icon_size ());
+    gtk_button_set_icon_name (GTK_IMAGE (header_bar->combined_stop_reload_image),
+                              "view-refresh-symbolic");
     gtk_widget_set_tooltip_text (header_bar->combined_stop_reload_button,
                                  _(REFRESH_BUTTON_TOOLTIP));
   }
diff --git a/src/ephy-link.c b/src/ephy-link.c
index cc7f69386..93c6a0009 100644
--- a/src/ephy-link.c
+++ b/src/ephy-link.c
@@ -94,6 +94,7 @@ ephy_link_open (EphyLink      *link,
   return new_embed;
 }
 
+#if 0
 EphyLinkFlags
 ephy_link_flags_from_current_event (void)
 {
@@ -122,3 +123,4 @@ ephy_link_flags_from_current_event (void)
 
   return flags;
 }
+#endif
diff --git a/src/ephy-session.c b/src/ephy-session.c
index af2df8f3c..fa8016955 100644
--- a/src/ephy-session.c
+++ b/src/ephy-session.c
@@ -255,7 +255,7 @@ ephy_session_undo_close_tab (EphySession *session)
       flags |= EPHY_NEW_TAB_FIRST;
     }
 
-    window = EPHY_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (tab_view)));
+    window = EPHY_WINDOW (gtk_widget_get_root (GTK_WIDGET (tab_view)));
     new_tab = ephy_shell_new_tab (ephy_shell_get_default (),
                                   window, embed,
                                   flags);
@@ -278,7 +278,7 @@ ephy_session_undo_close_tab (EphySession *session)
   }
 
   gtk_widget_grab_focus (GTK_WIDGET (new_tab));
-  gtk_window_present_with_time (GTK_WINDOW (window), gtk_get_current_event_time ());
+  gtk_window_present (GTK_WINDOW (window));
 
   closed_tab_free (tab);
 
@@ -325,24 +325,24 @@ ephy_session_get_can_undo_tab_closed (EphySession *session)
 }
 
 static void
-tab_view_page_attached_cb (HdyTabView  *tab_view,
-                           HdyTabPage  *page,
+tab_view_page_attached_cb (AdwTabView  *tab_view,
+                           AdwTabPage  *page,
                            guint        position,
                            EphySession *session)
 {
-  EphyEmbed *embed = EPHY_EMBED (hdy_tab_page_get_child (page));
+  EphyEmbed *embed = EPHY_EMBED (adw_tab_page_get_child (page));
 
   g_signal_connect (ephy_embed_get_web_view (embed), "load-changed",
                     G_CALLBACK (load_changed_cb), session);
 }
 
 static void
-tab_view_page_detached_cb (HdyTabView  *tab_view,
-                           HdyTabPage  *page,
+tab_view_page_detached_cb (AdwTabView  *tab_view,
+                           AdwTabPage  *page,
                            gint         position,
                            EphySession *session)
 {
-  EphyEmbed *embed = EPHY_EMBED (hdy_tab_page_get_child (page));
+  EphyEmbed *embed = EPHY_EMBED (adw_tab_page_get_child (page));
   EphyTabView *ephy_tab_view = EPHY_TAB_VIEW (g_object_get_data (G_OBJECT (tab_view), "ephy-tab-view"));
 
   ephy_session_save (session);
@@ -355,8 +355,8 @@ tab_view_page_detached_cb (HdyTabView  *tab_view,
 }
 
 static void
-tab_view_page_reordered_cb (HdyTabView  *tab_view,
-                            HdyTabPage  *page,
+tab_view_page_reordered_cb (AdwTabView  *tab_view,
+                            AdwTabPage  *page,
                             guint        position,
                             EphySession *session)
 {
@@ -364,7 +364,7 @@ tab_view_page_reordered_cb (HdyTabView  *tab_view,
 }
 
 static void
-tab_view_notify_selected_page_cb (HdyTabView  *tab_view,
+tab_view_notify_selected_page_cb (AdwTabView  *tab_view,
                                   GParamSpec  *pspec,
                                   EphySession *session)
 {
@@ -391,7 +391,7 @@ window_added_cb (GtkApplication *application,
                  EphySession    *session)
 {
   EphyWindow *ephy_window;
-  HdyTabView *tab_view;
+  AdwTabView *tab_view;
 
   ephy_session_save (session);
 
@@ -1136,6 +1136,14 @@ session_parser_context_free (SessionParserContext *context)
   g_free (context);
 }
 
+static void
+window_destroyed (GtkWidget  *widget,
+                  GtkWidget **widget_pointer)
+{
+  if (widget_pointer)
+    *widget_pointer = NULL;
+}
+
 static void
 session_parse_window (SessionParserContext  *context,
                       const gchar          **names,
@@ -1152,7 +1160,7 @@ session_parse_window (SessionParserContext  *context,
   }
 
   context->window = ephy_window_new ();
-  context->destroy_id = g_signal_connect (context->window, "destroy", G_CALLBACK (gtk_widget_destroyed), 
&context->window);
+  context->destroy_id = g_signal_connect (context->window, "destroy", G_CALLBACK (window_destroyed), 
&context->window);
 
   for (i = 0; names[i]; i++) {
     gulong int_value;
@@ -1198,7 +1206,7 @@ session_parse_embed (SessionParserContext  *context,
                      const gchar          **names,
                      const gchar          **values)
 {
-  HdyTabView *tab_view;
+  AdwTabView *tab_view;
   const char *url = NULL;
   const char *title = NULL;
   const char *history = NULL;
@@ -1265,8 +1273,8 @@ session_parse_embed (SessionParserContext  *context,
                                      context->window, NULL, flags,
                                      0);
 
-    hdy_tab_view_set_page_pinned (tab_view,
-                                  hdy_tab_view_get_page (tab_view, GTK_WIDGET (embed)),
+    adw_tab_view_set_page_pinned (tab_view,
+                                  adw_tab_view_get_page (tab_view, GTK_WIDGET (embed)),
                                   is_pin);
 
     web_view = ephy_embed_get_web_view (embed);
@@ -1796,7 +1804,7 @@ ephy_session_clear (EphySession *session)
   shell = ephy_shell_get_default ();
   windows = g_list_copy (gtk_application_get_windows (GTK_APPLICATION (shell)));
   for (p = windows; p; p = p->next)
-    gtk_widget_destroy (GTK_WIDGET (p->data));
+    gtk_window_destroy (GTK_WINDOW (p->data));
   g_list_free (windows);
   g_queue_foreach (session->closed_tabs,
                    (GFunc)closed_tab_free, NULL);
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index ef4d84392..7d43ac6ea 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -28,19 +28,19 @@
 #include "ephy-embed-container.h"
 #include "ephy-embed-utils.h"
 #include "ephy-file-helpers.h"
-#include "ephy-firefox-sync-dialog.h"
+//#include "ephy-firefox-sync-dialog.h"
 #include "ephy-gui.h"
-#include "ephy-header-bar.h"
-#include "ephy-history-dialog.h"
+//#include "ephy-header-bar.h"
+//#include "ephy-history-dialog.h"
 #include "ephy-link.h"
 #include "ephy-lockdown.h"
 #include "ephy-notification.h"
 #include "ephy-prefs.h"
-#include "ephy-prefs-dialog.h"
+//#include "ephy-prefs-dialog.h"
 #include "ephy-session.h"
 #include "ephy-settings.h"
 #include "ephy-sync-utils.h"
-#include "ephy-title-box.h"
+//#include "ephy-title-box.h"
 #include "ephy-title-widget.h"
 #include "ephy-type-builtins.h"
 #include "ephy-web-app-utils.h"
@@ -50,7 +50,6 @@
 
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
-#include <handy.h>
 
 struct _EphyShell {
   EphyEmbedShell parent_instance;
@@ -172,6 +171,7 @@ ephy_shell_startup_continue (EphyShell               *shell,
   shell->startup_finished = TRUE;
 }
 
+#if 0
 static void
 new_window (GSimpleAction *action,
             GVariant      *parameter,
@@ -311,6 +311,7 @@ quit_application (GSimpleAction *action,
 {
   window_cmd_quit (NULL, NULL, NULL);
 }
+#endif
 
 static void
 show_downloads (GSimpleAction *action,
@@ -339,7 +340,7 @@ launch_app (GSimpleAction *action,
    * is disabled when running under flatpak.
    */
   ephy_file_launch_desktop_file (desktop_file,
-                                 gtk_get_current_event_time (),
+                                 g_get_monotonic_time (),
                                  EPHY_FILE_HELPERS_I_UNDERSTAND_I_MUST_NOT_USE_THIS_FUNCTION_UNDER_FLATPAK);
 }
 
@@ -357,6 +358,7 @@ notification_clicked (GSimpleAction *action,
     webkit_notification_clicked (notification);
 }
 
+#if 0
 static GActionEntry app_entries[] = {
   { "new-window", new_window, NULL, NULL, NULL },
   { "new-incognito", new_incognito_window, NULL, NULL, NULL },
@@ -387,6 +389,7 @@ static GActionEntry app_mode_app_entries[] = {
   { "run-in-background", NULL, NULL, "false", NULL},
   { "notification-clicked", notification_clicked, "t", NULL, NULL},
 };
+#endif
 
 static void
 register_synchronizable_managers (EphyShell       *shell,
@@ -493,11 +496,6 @@ ephy_shell_startup (GApplication *application)
 
   G_APPLICATION_CLASS (ephy_shell_parent_class)->startup (application);
 
-  hdy_init ();
-
-  hdy_style_manager_set_color_scheme (hdy_style_manager_get_default (),
-                                      HDY_COLOR_SCHEME_PREFER_LIGHT);
-
   /* If we are under Pantheon set the icon-theme and cursor-theme accordingly. */
   if (is_desktop_pantheon ()) {
     GtkSettings *settings = gtk_settings_get_default ();
@@ -509,6 +507,7 @@ ephy_shell_startup (GApplication *application)
 
   /* We're not remoting; start our services */
 
+#if 0
   mode = ephy_embed_shell_get_mode (embed_shell);
   if (mode != EPHY_EMBED_SHELL_MODE_APPLICATION) {
     g_action_map_add_action_entries (G_ACTION_MAP (application),
@@ -562,6 +561,7 @@ ephy_shell_startup (GApplication *application)
   set_accel_for_action (shell, "app.history", "<Primary>h");
   set_accel_for_action (shell, "app.preferences", "<Primary>e");
   set_accel_for_action (shell, "app.quit", "<Primary>q");
+#endif
 }
 
 static GtkWidget *
@@ -742,6 +742,7 @@ ephy_shell_add_platform_data (GApplication    *application,
   }
 }
 
+#if 0
 static void
 ephy_shell_before_emit (GApplication *application,
                         GVariant     *platform_data)
@@ -829,7 +830,7 @@ ephy_shell_constructed (GObject *object)
   if (G_OBJECT_CLASS (ephy_shell_parent_class)->constructed)
     G_OBJECT_CLASS (ephy_shell_parent_class)->constructed (object);
 }
-
+#endif
 static void
 ephy_shell_class_init (EphyShellClass *klass)
 {
@@ -838,11 +839,11 @@ ephy_shell_class_init (EphyShellClass *klass)
 
   object_class->dispose = ephy_shell_dispose;
   object_class->finalize = ephy_shell_finalize;
-  object_class->constructed = ephy_shell_constructed;
+//  object_class->constructed = ephy_shell_constructed;
 
   application_class->startup = ephy_shell_startup;
   application_class->activate = ephy_shell_activate;
-  application_class->before_emit = ephy_shell_before_emit;
+//  application_class->before_emit = ephy_shell_before_emit;
   application_class->add_platform_data = ephy_shell_add_platform_data;
 }
 
@@ -876,7 +877,7 @@ ephy_shell_dispose (GObject *object)
 
   g_clear_object (&shell->session);
   g_clear_object (&shell->lockdown);
-  g_clear_pointer (&shell->history_dialog, gtk_widget_destroy);
+  g_clear_pointer ((GtkWindow **) &shell->history_dialog, gtk_window_destroy);
   g_clear_object (&shell->prefs_dialog);
   g_clear_object (&shell->network_monitor);
   g_clear_object (&shell->sync_service);
@@ -1169,7 +1170,6 @@ ephy_shell_get_bookmarks_manager (EphyShell *shell)
 
   return shell->bookmarks_manager;
 }
-
 /**
  * ephy_shell_get_history_manager:
  * @shell: the #EphyShell
@@ -1220,6 +1220,7 @@ ephy_shell_get_net_monitor (EphyShell *shell)
   return shell->network_monitor;
 }
 
+#if 0
 /**
  * ephy_shell_get_history_dialog:
  *
@@ -1283,6 +1284,7 @@ ephy_shell_get_prefs_dialog (EphyShell *shell)
 
   return shell->prefs_dialog;
 }
+#endif
 
 void
 _ephy_shell_create_instance (EphyEmbedShellMode mode)
@@ -1358,7 +1360,7 @@ ephy_shell_close_all_windows (EphyShell *shell)
     windows = windows->next;
 
     if (ephy_window_close (window))
-      gtk_widget_destroy (GTK_WIDGET (window));
+      gtk_window_destroy (GTK_WINDOW (window));
     else
       retval = FALSE;
   }
@@ -1436,7 +1438,7 @@ static gboolean
 ephy_shell_open_uris_idle (OpenURIsData *data)
 {
   EphyEmbed *embed = NULL;
-  EphyHeaderBar *header_bar;
+//  EphyHeaderBar *header_bar;
   EphyTitleWidget *title_widget;
   EphyEmbedShellMode mode;
   EphyNewTabFlags page_flags = 0;
@@ -1482,9 +1484,9 @@ ephy_shell_open_uris_idle (OpenURIsData *data)
   }
 
   /* Set address from the very beginning. Looks odd in app mode if it appears later on. */
-  header_bar = EPHY_HEADER_BAR (ephy_window_get_header_bar (data->window));
-  title_widget = ephy_header_bar_get_title_widget (header_bar);
-  ephy_title_widget_set_address (title_widget, url);
+//  header_bar = EPHY_HEADER_BAR (ephy_window_get_header_bar (data->window));
+//  title_widget = ephy_header_bar_get_title_widget (header_bar);
+//  ephy_title_widget_set_address (title_widget, url);
 
   data->current_uri++;
   data->previous_embed = embed;
@@ -1541,6 +1543,7 @@ ephy_shell_startup_finished (EphyShell *shell)
   return shell->startup_finished;
 }
 
+#if 0
 EphyWebExtensionManager *
 ephy_shell_get_web_extension_manager (EphyShell *shell)
 {
@@ -1551,6 +1554,7 @@ ephy_shell_get_web_extension_manager (EphyShell *shell)
 
   return shell->web_extension_manager;
 }
+#endif
 
 
 /* Helper functions: better place for this? */
diff --git a/src/ephy-tab-view.c b/src/ephy-tab-view.c
index e2c785892..65f39c18d 100644
--- a/src/ephy-tab-view.c
+++ b/src/ephy-tab-view.c
@@ -22,7 +22,7 @@
 #include "ephy-tab-view.h"
 
 #include "ephy-desktop-utils.h"
-#include "ephy-dnd.h"
+//#include "ephy-dnd.h"
 #include "ephy-embed-utils.h"
 #include "ephy-link.h"
 #include "ephy-settings.h"
@@ -31,14 +31,14 @@
 #define MAX_NUMBER_OF_URLS 20
 
 struct _EphyTabView {
-  GtkBin parent_instance;
+  AdwBin parent_instance;
 
-  HdyTabView *tab_view;
-  HdyTabBar *tab_bar;
-  HdyTabPage *current_page;
+  AdwTabView *tab_view;
+  AdwTabBar *tab_bar;
+  AdwTabPage *current_page;
 };
 
-G_DEFINE_TYPE (EphyTabView, ephy_tab_view, GTK_TYPE_BIN)
+G_DEFINE_TYPE (EphyTabView, ephy_tab_view, ADW_TYPE_BIN)
 
 enum {
   PROP_0,
@@ -58,19 +58,19 @@ notify_n_pages_cb (EphyTabView *self)
 static void
 notify_selected_page_cb (EphyTabView *self)
 {
-  HdyTabPage *page = hdy_tab_view_get_selected_page (self->tab_view);
+  AdwTabPage *page = adw_tab_view_get_selected_page (self->tab_view);
 
   if (page)
-    hdy_tab_page_set_needs_attention (page, FALSE);
+    adw_tab_page_set_needs_attention (page, FALSE);
 
   g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SELECTED_INDEX]);
 }
 
 static void
 indicator_activated_cb (EphyTabView *self,
-                        HdyTabPage  *page)
+                        AdwTabPage  *page)
 {
-  EphyEmbed *embed = EPHY_EMBED (hdy_tab_page_get_child (page));
+  EphyEmbed *embed = EPHY_EMBED (adw_tab_page_get_child (page));
   EphyWebView *view = ephy_embed_get_web_view (embed);
   gboolean muted = webkit_web_view_get_is_muted (WEBKIT_WEB_VIEW (view));
 
@@ -79,18 +79,18 @@ indicator_activated_cb (EphyTabView *self,
 
 static void
 setup_menu_cb (EphyTabView *self,
-               HdyTabPage  *page)
+               AdwTabPage  *page)
 {
   self->current_page = page;
 }
 
-static HdyTabPage *
+static AdwTabPage *
 get_current_page (EphyTabView *self)
 {
   if (self->current_page)
     return self->current_page;
 
-  return hdy_tab_view_get_selected_page (self->tab_view);
+  return adw_tab_view_get_selected_page (self->tab_view);
 }
 
 static void
@@ -150,12 +150,11 @@ ephy_tab_view_class_init (EphyTabViewClass *klass)
 static void
 ephy_tab_view_init (EphyTabView *self)
 {
-  self->tab_view = HDY_TAB_VIEW (hdy_tab_view_new ());
-  gtk_widget_show (GTK_WIDGET (self->tab_view));
+  self->tab_view = ADW_TAB_VIEW (adw_tab_view_new ());
 
   g_object_set_data (G_OBJECT (self->tab_view), "ephy-tab-view", self);
 
-  gtk_container_add (GTK_CONTAINER (self), GTK_WIDGET (self->tab_view));
+  adw_bin_set_child (ADW_BIN (self), GTK_WIDGET (self->tab_view));
 
   g_signal_connect_object (self->tab_view,
                            "notify::n-pages",
@@ -191,52 +190,52 @@ ephy_tab_view_new (void)
 void
 ephy_tab_view_next (EphyTabView *self)
 {
-  hdy_tab_view_select_next_page (self->tab_view);
+  adw_tab_view_select_next_page (self->tab_view);
 }
 
 void
 ephy_tab_view_pin (EphyTabView *self)
 {
-  hdy_tab_view_set_page_pinned (self->tab_view, get_current_page (self), TRUE);
+  adw_tab_view_set_page_pinned (self->tab_view, get_current_page (self), TRUE);
 }
 
 void
 ephy_tab_view_unpin (EphyTabView *self)
 {
-  hdy_tab_view_set_page_pinned (self->tab_view, get_current_page (self), FALSE);
+  adw_tab_view_set_page_pinned (self->tab_view, get_current_page (self), FALSE);
 }
 
 void
 ephy_tab_view_close (EphyTabView *self,
                      GtkWidget   *widget)
 {
-  HdyTabPage *page = hdy_tab_view_get_page (self->tab_view, widget);
+  AdwTabPage *page = adw_tab_view_get_page (self->tab_view, widget);
 
-  hdy_tab_view_close_page (self->tab_view, page);
+  adw_tab_view_close_page (self->tab_view, page);
 }
 
 void
 ephy_tab_view_close_selected (EphyTabView *self)
 {
-  hdy_tab_view_close_page (self->tab_view, get_current_page (self));
+  adw_tab_view_close_page (self->tab_view, get_current_page (self));
 }
 
 void
 ephy_tab_view_close_left (EphyTabView *self)
 {
-  hdy_tab_view_close_pages_before (self->tab_view, get_current_page (self));
+  adw_tab_view_close_pages_before (self->tab_view, get_current_page (self));
 }
 
 void
 ephy_tab_view_close_right (EphyTabView *self)
 {
-  hdy_tab_view_close_pages_after (self->tab_view, get_current_page (self));
+  adw_tab_view_close_pages_after (self->tab_view, get_current_page (self));
 }
 
 void
 ephy_tab_view_close_other (EphyTabView *self)
 {
-  hdy_tab_view_close_other_pages (self->tab_view, get_current_page (self));
+  adw_tab_view_close_other_pages (self->tab_view, get_current_page (self));
 }
 
 void
@@ -246,67 +245,67 @@ ephy_tab_view_foreach (EphyTabView         *self,
 {
   int i, n;
 
-  n = hdy_tab_view_get_n_pages (self->tab_view);
+  n = adw_tab_view_get_n_pages (self->tab_view);
 
   for (i = 0; i < n; i++) {
-    HdyTabPage *page = hdy_tab_view_get_nth_page (self->tab_view, i);
+    AdwTabPage *page = adw_tab_view_get_nth_page (self->tab_view, i);
 
-    callback (hdy_tab_page_get_child (page), user_data);
+    callback (adw_tab_page_get_child (page), user_data);
   }
 }
 
 int
 ephy_tab_view_get_n_pages (EphyTabView *self)
 {
-  return hdy_tab_view_get_n_pages (self->tab_view);
+  return adw_tab_view_get_n_pages (self->tab_view);
 }
 
 int
 ephy_tab_view_get_selected_index (EphyTabView *self)
 {
-  HdyTabPage *page = hdy_tab_view_get_selected_page (self->tab_view);
+  AdwTabPage *page = adw_tab_view_get_selected_page (self->tab_view);
 
   if (!page)
     return -1;
 
-  return hdy_tab_view_get_page_position (self->tab_view, page);
+  return adw_tab_view_get_page_position (self->tab_view, page);
 }
 
 int
 ephy_tab_view_get_page_index (EphyTabView *self,
                               GtkWidget   *widget)
 {
-  HdyTabPage *page = hdy_tab_view_get_page (self->tab_view, widget);
+  AdwTabPage *page = adw_tab_view_get_page (self->tab_view, widget);
 
-  return hdy_tab_view_get_page_position (self->tab_view, page);
+  return adw_tab_view_get_page_position (self->tab_view, page);
 }
 
 GtkWidget *
 ephy_tab_view_get_nth_page (EphyTabView *self,
                             int          index)
 {
-  HdyTabPage *page = hdy_tab_view_get_nth_page (self->tab_view, index);
+  AdwTabPage *page = adw_tab_view_get_nth_page (self->tab_view, index);
 
-  return hdy_tab_page_get_child (page);
+  return adw_tab_page_get_child (page);
 }
 
 void
 ephy_tab_view_select_nth_page (EphyTabView *self,
                                int          index)
 {
-  HdyTabPage *page = hdy_tab_view_get_nth_page (self->tab_view, index);
+  AdwTabPage *page = adw_tab_view_get_nth_page (self->tab_view, index);
 
-  hdy_tab_view_set_selected_page (self->tab_view, page);
+  adw_tab_view_set_selected_page (self->tab_view, page);
 }
 
 gboolean
 ephy_tab_view_select_page (EphyTabView *self,
                            GtkWidget   *widget)
 {
-  HdyTabPage *page = hdy_tab_view_get_page (self->tab_view, widget);
+  AdwTabPage *page = adw_tab_view_get_page (self->tab_view, widget);
 
   if (page)
-    hdy_tab_view_set_selected_page (self->tab_view, page);
+    adw_tab_view_set_selected_page (self->tab_view, page);
 
   return !!page;
 }
@@ -314,15 +313,15 @@ ephy_tab_view_select_page (EphyTabView *self,
 GtkWidget *
 ephy_tab_view_get_selected_page (EphyTabView *self)
 {
-  HdyTabPage *page = hdy_tab_view_get_selected_page (self->tab_view);
+  AdwTabPage *page = adw_tab_view_get_selected_page (self->tab_view);
 
   if (!page)
     return NULL;
 
-  return hdy_tab_page_get_child (page);
+  return adw_tab_page_get_child (page);
 }
 
-HdyTabView *
+AdwTabView *
 ephy_tab_view_get_tab_view (EphyTabView *self)
 {
   return self->tab_view;
@@ -334,11 +333,11 @@ ephy_tab_view_get_pages (EphyTabView *self)
   GList *list = NULL;
   int i, n;
 
-  n = hdy_tab_view_get_n_pages (self->tab_view);
+  n = adw_tab_view_get_n_pages (self->tab_view);
 
   for (i = 0; i < n; i++) {
-    HdyTabPage *page = hdy_tab_view_get_nth_page (self->tab_view, i);
-    GtkWidget *content = hdy_tab_page_get_child (page);
+    AdwTabPage *page = adw_tab_view_get_nth_page (self->tab_view, i);
+    GtkWidget *content = adw_tab_page_get_child (page);
 
     list = g_list_prepend (list, content);
   }
@@ -350,26 +349,26 @@ gboolean
 ephy_tab_view_get_is_pinned (EphyTabView *self,
                              GtkWidget   *widget)
 {
-  HdyTabPage *page = hdy_tab_view_get_page (self->tab_view, widget);
+  AdwTabPage *page = adw_tab_view_get_page (self->tab_view, widget);
 
-  return hdy_tab_page_get_pinned (page);
+  return adw_tab_page_get_pinned (page);
 }
 
 static void
-update_title_cb (HdyTabPage *page)
+update_title_cb (AdwTabPage *page)
 {
-  EphyEmbed *embed = EPHY_EMBED (hdy_tab_page_get_child (page));
+  EphyEmbed *embed = EPHY_EMBED (adw_tab_page_get_child (page));
   EphyWebView *view = ephy_embed_get_web_view (embed);
   const char *title = ephy_embed_get_title (embed);
   const char *address;
 
   if (!ephy_embed_has_load_pending (embed) &&
-      !hdy_tab_page_get_selected (page) &&
-      hdy_tab_page_get_pinned (page))
-    hdy_tab_page_set_needs_attention (page, TRUE);
+      !adw_tab_page_get_selected (page) &&
+      adw_tab_page_get_pinned (page))
+    adw_tab_page_set_needs_attention (page, TRUE);
 
   if (title && strlen (title)) {
-    hdy_tab_page_set_title (page, title);
+    adw_tab_page_set_title (page, title);
     return;
   }
 
@@ -377,20 +376,20 @@ update_title_cb (HdyTabPage *page)
 
   if (ephy_web_view_is_loading (view) &&
       !ephy_embed_utils_is_no_show_address (address))
-    hdy_tab_page_set_title (page, address);
+    adw_tab_page_set_title (page, address);
 }
 
 static void
-update_icon_cb (HdyTabPage *page)
+update_icon_cb (AdwTabPage *page)
 {
-  EphyEmbed *embed = EPHY_EMBED (hdy_tab_page_get_child (page));
+  EphyEmbed *embed = EPHY_EMBED (adw_tab_page_get_child (page));
   EphyWebView *view = ephy_embed_get_web_view (embed);
   GIcon *icon = G_ICON (ephy_web_view_get_icon (view));
   g_autoptr (GIcon) placeholder_icon = NULL;
   const char *uri, *favicon_name;
 
   if (icon) {
-    hdy_tab_page_set_icon (page, icon);
+    adw_tab_page_set_icon (page, icon);
     return;
   }
 
@@ -400,13 +399,13 @@ update_icon_cb (HdyTabPage *page)
   if (favicon_name)
     placeholder_icon = g_themed_icon_new (favicon_name);
 
-  hdy_tab_page_set_icon (page, placeholder_icon);
+  adw_tab_page_set_icon (page, placeholder_icon);
 }
 
 static void
-update_indicator_cb (HdyTabPage *page)
+update_indicator_cb (AdwTabPage *page)
 {
-  EphyEmbed *embed = EPHY_EMBED (hdy_tab_page_get_child (page));
+  EphyEmbed *embed = EPHY_EMBED (adw_tab_page_get_child (page));
   EphyWebView *view = ephy_embed_get_web_view (embed);
   g_autoptr (GIcon) icon = NULL;
 
@@ -417,7 +416,7 @@ update_indicator_cb (HdyTabPage *page)
       icon = G_ICON (g_themed_icon_new ("ephy-audio-playing-symbolic"));
   }
 
-  hdy_tab_page_set_indicator_icon (page, icon);
+  adw_tab_page_set_indicator_icon (page, icon);
 }
 
 int
@@ -427,26 +426,26 @@ ephy_tab_view_add_tab (EphyTabView *self,
                        int          position,
                        gboolean     jump_to)
 {
-  HdyTabPage *page;
+  AdwTabPage *page;
   EphyWebView *view;
 
   if (parent) {
-    HdyTabPage *parent_page;
+    AdwTabPage *parent_page;
 
-    parent_page = hdy_tab_view_get_page (self->tab_view, GTK_WIDGET (parent));
-    page = hdy_tab_view_add_page (self->tab_view, GTK_WIDGET (embed), parent_page);
+    parent_page = adw_tab_view_get_page (self->tab_view, GTK_WIDGET (parent));
+    page = adw_tab_view_add_page (self->tab_view, GTK_WIDGET (embed), parent_page);
   } else if (position < 0) {
-    page = hdy_tab_view_append (self->tab_view, GTK_WIDGET (embed));
+    page = adw_tab_view_append (self->tab_view, GTK_WIDGET (embed));
   } else {
-    page = hdy_tab_view_insert (self->tab_view, GTK_WIDGET (embed), position);
+    page = adw_tab_view_insert (self->tab_view, GTK_WIDGET (embed), position);
   }
 
   if (jump_to)
-    hdy_tab_view_set_selected_page (self->tab_view, page);
+    adw_tab_view_set_selected_page (self->tab_view, page);
 
   view = ephy_embed_get_web_view (embed);
 
-  hdy_tab_page_set_indicator_activatable (page, TRUE);
+  adw_tab_page_set_indicator_activatable (page, TRUE);
 
   g_object_bind_property (view, "is-loading", page, "loading", G_BINDING_SYNC_CREATE);
 
@@ -473,23 +472,23 @@ ephy_tab_view_add_tab (EphyTabView *self,
   update_icon_cb (page);
   update_indicator_cb (page);
 
-  return hdy_tab_view_get_page_position (self->tab_view, page);
+  return adw_tab_view_get_page_position (self->tab_view, page);
 }
 
 GtkWidget *
 ephy_tab_view_get_current_page (EphyTabView *self)
 {
-  HdyTabPage *page = get_current_page (self);
+  AdwTabPage *page = get_current_page (self);
 
   if (!page)
     return NULL;
 
-  return hdy_tab_page_get_child (page);
+  return adw_tab_page_get_child (page);
 }
-
+#if 0
 static void
 drag_data_received_cb (EphyTabView      *self,
-                       HdyTabPage       *page,
+                       AdwTabPage       *page,
                        GdkDragContext   *context,
                        GtkSelectionData *selection_data,
                        guint             info,
@@ -508,7 +507,7 @@ drag_data_received_cb (EphyTabView      *self,
   if (gtk_selection_data_get_length (selection_data) <= 0 || data)
     return;
 
-  embed = EPHY_EMBED (hdy_tab_page_get_child (page));
+  embed = EPHY_EMBED (adw_tab_page_get_child (page));
   target = gtk_selection_data_get_target (selection_data);
 
   window = gtk_widget_get_toplevel (GTK_WIDGET (self));
@@ -546,7 +545,7 @@ drag_data_received_cb (EphyTabView      *self,
     }
   }
 }
-
+#endif
 static void
 visibility_policy_changed_cb (EphyTabView *self)
 {
@@ -561,7 +560,7 @@ visibility_policy_changed_cb (EphyTabView *self)
     policy = g_settings_get_enum (EPHY_SETTINGS_UI,
                                   EPHY_PREFS_UI_TABS_BAR_VISIBILITY_POLICY);
 
-  hdy_tab_bar_set_autohide (self->tab_bar,
+  adw_tab_bar_set_autohide (self->tab_bar,
                             policy != EPHY_PREFS_UI_TABS_BAR_VISIBILITY_POLICY_ALWAYS);
   gtk_widget_set_visible (GTK_WIDGET (self->tab_bar),
                           mode != EPHY_EMBED_SHELL_MODE_APPLICATION &&
@@ -574,7 +573,7 @@ expand_changed_cb (EphyTabView *self)
   gboolean expand = g_settings_get_boolean (EPHY_SETTINGS_UI,
                                             EPHY_PREFS_UI_EXPAND_TABS_BAR);
 
-  hdy_tab_bar_set_expand_tabs (self->tab_bar, expand);
+  adw_tab_bar_set_expand_tabs (self->tab_bar, expand);
 }
 
 static gboolean
@@ -599,46 +598,45 @@ is_layout_reversed (void)
 static void
 notify_decoration_layout_cb (EphyTabView *self)
 {
-  hdy_tab_bar_set_inverted (self->tab_bar, is_layout_reversed ());
+  adw_tab_bar_set_inverted (self->tab_bar, is_layout_reversed ());
 }
 
 void
 ephy_tab_view_set_tab_bar (EphyTabView *self,
-                           HdyTabBar   *tab_bar)
+                           AdwTabBar   *tab_bar)
 {
-  g_autoptr (GtkTargetList) target_list = NULL;
+//  g_autoptr (GtkTargetList) target_list = NULL;
   GtkSettings *settings;
-  static const GtkTargetEntry url_drag_types [] = {
+/*  static const GtkTargetEntry url_drag_types [] = {
     { (char *)EPHY_DND_URI_LIST_TYPE, 0, 0 },
     { (char *)EPHY_DND_URL_TYPE, 0, 1 },
-  };
+  };*/
 
   self->tab_bar = tab_bar;
-
+/*
   target_list = gtk_target_list_new (url_drag_types,
                                      G_N_ELEMENTS (url_drag_types));
   gtk_target_list_add_text_targets (target_list, 0);
 
-  hdy_tab_bar_set_extra_drag_dest_targets (self->tab_bar, target_list);
+  adw_tab_bar_set_extra_drag_dest_targets (self->tab_bar, target_list);
 
   g_signal_connect_object (tab_bar, "extra-drag-data-received",
                            G_CALLBACK (drag_data_received_cb), self,
                            G_CONNECT_SWAPPED);
-
+*/
   if (is_desktop_pantheon ()) {
     GtkWidget *button;
 
-    hdy_tab_bar_set_autohide (tab_bar, FALSE);
-    hdy_tab_bar_set_expand_tabs (tab_bar, FALSE);
+    adw_tab_bar_set_autohide (tab_bar, FALSE);
+    adw_tab_bar_set_expand_tabs (tab_bar, FALSE);
 
-    button = gtk_button_new_from_icon_name ("list-add-symbolic", GTK_ICON_SIZE_MENU);
+    button = gtk_button_new_from_icon_name ("list-add-symbolic");
     /* Translators: tooltip for the new tab button */
     gtk_widget_set_tooltip_text (button, _("Open a new tab"));
     gtk_actionable_set_action_name (GTK_ACTIONABLE (button), "win.new-tab");
     gtk_style_context_add_class (gtk_widget_get_style_context (button), "flat");
-    gtk_widget_show (button);
 
-    hdy_tab_bar_set_start_action_widget (tab_bar, button);
+    adw_tab_bar_set_start_action_widget (tab_bar, button);
   } else {
     g_signal_connect_object (EPHY_SETTINGS_UI,
                              "changed::" EPHY_PREFS_UI_TABS_BAR_VISIBILITY_POLICY,
diff --git a/src/ephy-tab-view.h b/src/ephy-tab-view.h
index b95d1c85f..fd6c04484 100644
--- a/src/ephy-tab-view.h
+++ b/src/ephy-tab-view.h
@@ -22,13 +22,13 @@
 
 #include "ephy-embed.h"
 
-#include <handy.h>
+#include <adwaita.h>
 
 G_BEGIN_DECLS
 
 #define EPHY_TYPE_TAB_VIEW (ephy_tab_view_get_type())
 
-G_DECLARE_FINAL_TYPE (EphyTabView, ephy_tab_view, EPHY, TAB_VIEW, GtkBin)
+G_DECLARE_FINAL_TYPE (EphyTabView, ephy_tab_view, EPHY, TAB_VIEW, AdwBin)
 
 typedef void (*EphyTabViewCallback) (GtkWidget *widget,
                                      gpointer   data);
@@ -66,7 +66,7 @@ gboolean     ephy_tab_view_select_page        (EphyTabView *self,
 
 GtkWidget   *ephy_tab_view_get_selected_page  (EphyTabView *self);
 
-HdyTabView  *ephy_tab_view_get_tab_view       (EphyTabView *self);
+AdwTabView  *ephy_tab_view_get_tab_view       (EphyTabView *self);
 
 GList        *ephy_tab_view_get_pages         (EphyTabView *self);
 
@@ -82,6 +82,6 @@ gint          ephy_tab_view_add_tab           (EphyTabView *self,
 GtkWidget    *ephy_tab_view_get_current_page  (EphyTabView *self);
 
 void          ephy_tab_view_set_tab_bar       (EphyTabView *self,
-                                               HdyTabBar   *tab_bar);
+                                               AdwTabBar   *tab_bar);
 
 G_END_DECLS
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 046360e12..77803501e 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -42,9 +42,9 @@
 #include "ephy-fullscreen-box.h"
 #include "ephy-gsb-utils.h"
 #include "ephy-gui.h"
-#include "ephy-header-bar.h"
+//#include "ephy-header-bar.h"
 #include "ephy-link.h"
-#include "ephy-location-entry.h"
+//#include "ephy-location-entry.h"
 #include "ephy-mouse-gesture-controller.h"
 #include "ephy-pages-popover.h"
 #include "ephy-pages-view.h"
@@ -54,7 +54,7 @@
 #include "ephy-session.h"
 #include "ephy-settings.h"
 #include "ephy-shell.h"
-#include "ephy-title-box.h"
+//#include "ephy-title-box.h"
 #include "ephy-title-widget.h"
 #include "ephy-type-builtins.h"
 #include "ephy-uri-helpers.h"
@@ -147,18 +147,17 @@ const struct {
 #define SETTINGS_CONNECTION_DATA_KEY    "EphyWindowSettings"
 
 struct _EphyWindow {
-  HdyApplicationWindow parent_instance;
+  AdwApplicationWindow parent_instance;
 
-  GtkWidget *main_deck;
+  GtkWidget *main_leaflet;
   EphyFullscreenBox *fullscreen_box;
-  GtkWidget *window_handle;
   GtkBox *titlebar_box;
   GtkWidget *header_bar;
   EphyPagesView *pages_view;
   EphyBookmarksManager *bookmarks_manager;
   GHashTable *action_labels;
   EphyTabView *tab_view;
-  HdyTabBar *tab_bar;
+  AdwTabBar *tab_bar;
   GtkRevealer *tab_bar_revealer;
   GtkRevealer *pages_menu_revealer;
   EphyPagesPopover *pages_popover;
@@ -195,8 +194,6 @@ struct _EphyWindow {
   guint checking_modified_forms : 1;
   guint confirmed_close_with_multiple_tabs : 1;
   guint present_on_insert : 1;
-
-  guint32 present_on_insert_user_time;
 };
 
 enum {
@@ -352,7 +349,7 @@ ephy_window_open_link (EphyLink      *link,
                EPHY_LINK_NEW_TAB |
                EPHY_LINK_NEW_WINDOW)) {
     EphyNewTabFlags ntflags = 0;
-    EphyWindow *target_window = EPHY_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (embed)));
+    EphyWindow *target_window = EPHY_WINDOW (gtk_widget_get_root (GTK_WIDGET (embed)));
 
     if (flags & EPHY_LINK_JUMP_TO) {
       ntflags |= EPHY_NEW_TAB_JUMP;
@@ -398,7 +395,7 @@ ephy_window_link_iface_init (EphyLinkInterface *iface)
   iface->open_link = ephy_window_open_link;
 }
 
-G_DEFINE_TYPE_WITH_CODE (EphyWindow, ephy_window, HDY_TYPE_APPLICATION_WINDOW,
+G_DEFINE_TYPE_WITH_CODE (EphyWindow, ephy_window, ADW_TYPE_APPLICATION_WINDOW,
                          G_IMPLEMENT_INTERFACE (EPHY_TYPE_LINK,
                                                 ephy_window_link_iface_init)
                          G_IMPLEMENT_INTERFACE (EPHY_TYPE_EMBED_CONTAINER,
@@ -447,6 +444,7 @@ sync_tab_load_status (EphyWebView     *view,
 
   loading = ephy_web_view_is_loading (view);
 
+#if 0
   action_group = gtk_widget_get_action_group (GTK_WIDGET (window), "win");
 
   /* disable print while loading, see bug #116344 */
@@ -464,6 +462,7 @@ sync_tab_load_status (EphyWebView     *view,
   action = g_action_map_lookup_action (G_ACTION_MAP (action_group),
                                        "combined-stop-reload");
   g_action_change_state (action, g_variant_new_boolean (loading));
+#endif
 }
 
 static void
@@ -479,10 +478,11 @@ sync_tab_security (EphyWebView *view,
 
   ephy_web_view_get_security_level (view, &security_level, NULL, NULL, NULL);
 
-  title_widget = ephy_header_bar_get_title_widget (EPHY_HEADER_BAR (window->header_bar));
-  ephy_title_widget_set_security_level (title_widget, security_level);
+//  title_widget = ephy_header_bar_get_title_widget (EPHY_HEADER_BAR (window->header_bar));
+//  ephy_title_widget_set_security_level (title_widget, security_level);
 }
 
+#if 0
 static void
 update_adaptive_mode (EphyWindow *window)
 {
@@ -1279,6 +1279,7 @@ sync_tab_page_action (EphyWebView *view,
   manager = ephy_shell_get_web_extension_manager (ephy_shell_get_default ());
   ephy_web_extension_manager_update_location_entry (manager, window);
 }
+#endif
 
 static gboolean
 idle_unref_context_event (EphyWindow *window)
@@ -1312,6 +1313,7 @@ _ephy_window_unset_context_event (EphyWindow *window)
   }
 }
 
+#if 0
 static void
 context_menu_dismissed_cb (WebKitWebView *webView,
                            EphyWindow    *window)
@@ -1877,6 +1879,7 @@ web_process_terminated_cb (EphyWebView                       *web_view,
 {
   gtk_window_unfullscreen (GTK_WINDOW (window));
 }
+#endif
 
 static void
 ephy_window_set_is_popup (EphyWindow *window,
@@ -1887,6 +1890,7 @@ ephy_window_set_is_popup (EphyWindow *window,
   g_object_notify (G_OBJECT (window), "is-popup");
 }
 
+#if 0
 static void
 window_properties_geometry_changed (WebKitWindowProperties *properties,
                                     GParamSpec             *pspec,
@@ -2533,6 +2537,7 @@ ephy_window_disconnect_active_embed (EphyWindow *window)
                                         G_CALLBACK (web_process_terminated_cb),
                                         window);
 }
+#endif
 
 static void
 ephy_window_set_active_tab (EphyWindow *window,
@@ -2541,27 +2546,28 @@ ephy_window_set_active_tab (EphyWindow *window,
   EphyEmbed *old_embed;
 
   g_assert (EPHY_IS_WINDOW (window));
-  g_assert (gtk_widget_get_toplevel (GTK_WIDGET (new_embed)) == GTK_WIDGET (window));
+  g_assert (gtk_widget_get_root (GTK_WIDGET (new_embed)) == GTK_ROOT (window));
 
   old_embed = window->active_embed;
 
   if (old_embed == new_embed)
     return;
 
-  if (old_embed != NULL)
-    ephy_window_disconnect_active_embed (window);
+//  if (old_embed != NULL)
+//    ephy_window_disconnect_active_embed (window);
 
   window->active_embed = new_embed;
 
-  if (new_embed != NULL)
-    ephy_window_connect_active_embed (window);
+//  if (new_embed != NULL)
+//    ephy_window_connect_active_embed (window);
 }
 
 static void
-tab_view_setup_menu_cb (HdyTabView *tab_view,
-                        HdyTabPage *page,
+tab_view_setup_menu_cb (AdwTabView *tab_view,
+                        AdwTabPage *page,
                         EphyWindow *window)
 {
+#if 0
   EphyWebView *view;
   GActionGroup *action_group;
   GAction *action;
@@ -2573,12 +2579,12 @@ tab_view_setup_menu_cb (HdyTabView *tab_view,
   gboolean muted;
 
   if (page) {
-    n_pages = hdy_tab_view_get_n_pages (tab_view);
-    n_pinned_pages = hdy_tab_view_get_n_pinned_pages (tab_view);
-    position = hdy_tab_view_get_page_position (tab_view, page);
-    pinned = hdy_tab_page_get_pinned (page);
+    n_pages = adw_tab_view_get_n_pages (tab_view);
+    n_pinned_pages = adw_tab_view_get_n_pinned_pages (tab_view);
+    position = adw_tab_view_get_page_position (tab_view, page);
+    pinned = adw_tab_page_get_pinned (page);
 
-    view = ephy_embed_get_web_view (EPHY_EMBED (hdy_tab_page_get_child (page)));
+    view = ephy_embed_get_web_view (EPHY_EMBED (adw_tab_page_get_child (page)));
     audio_playing = webkit_web_view_is_playing_audio (WEBKIT_WEB_VIEW (view));
     muted = webkit_web_view_get_is_muted (WEBKIT_WEB_VIEW (view));
   }
@@ -2620,6 +2626,7 @@ tab_view_setup_menu_cb (HdyTabView *tab_view,
   action = g_action_map_lookup_action (G_ACTION_MAP (action_group),
                                        "close");
   g_simple_action_set_enabled (G_SIMPLE_ACTION (action), !page || !pinned);
+#endif
 }
 
 static gboolean
@@ -2627,8 +2634,7 @@ present_on_idle_cb (GtkWindow *window)
 {
   EphyWindow *ephy_window = EPHY_WINDOW (window);
 
-  gtk_window_present_with_time (window, ephy_window->present_on_insert_user_time);
-  ephy_window->present_on_insert_user_time = 0;
+  gtk_window_present (window);
 
   return FALSE;
 }
@@ -2637,7 +2643,7 @@ static gboolean
 delayed_remove_child (gpointer data)
 {
   GtkWidget *widget = GTK_WIDGET (data);
-  EphyEmbedContainer *container = EPHY_EMBED_CONTAINER (gtk_widget_get_toplevel (widget));
+  EphyEmbedContainer *container = EPHY_EMBED_CONTAINER (gtk_widget_get_root (widget));
 
   ephy_embed_container_remove_child (container, EPHY_EMBED (widget));
 
@@ -2663,6 +2669,7 @@ static void
 update_reader_mode (EphyWindow  *window,
                     EphyWebView *view)
 {
+/*
   EphyEmbed *embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
   EphyWebView *active_view = ephy_embed_get_web_view (embed);
   gboolean available = ephy_web_view_is_reader_mode_available (view);
@@ -2679,7 +2686,7 @@ update_reader_mode (EphyWindow  *window,
   ephy_location_entry_set_reader_mode_visible (lentry, available);
 
   if (available)
-    ephy_location_entry_set_reader_mode_state (lentry, ephy_web_view_get_reader_mode_state (view));
+    ephy_location_entry_set_reader_mode_state (lentry, ephy_web_view_get_reader_mode_state (view));*/
 }
 
 static void
@@ -2691,12 +2698,12 @@ reader_mode_cb (EphyWebView *view,
 }
 
 static void
-tab_view_page_attached_cb (HdyTabView *tab_view,
-                           HdyTabPage *page,
+tab_view_page_attached_cb (AdwTabView *tab_view,
+                           AdwTabPage *page,
                            gint        position,
                            EphyWindow *window)
 {
-  GtkWidget *content = hdy_tab_page_get_child (page);
+  GtkWidget *content = adw_tab_page_get_child (page);
   EphyEmbed *embed;
 
   g_assert (EPHY_IS_EMBED (content));
@@ -2718,12 +2725,12 @@ tab_view_page_attached_cb (HdyTabView *tab_view,
 }
 
 static void
-tab_view_page_detached_cb (HdyTabView *tab_view,
-                           HdyTabPage *page,
+tab_view_page_detached_cb (AdwTabView *tab_view,
+                           AdwTabPage *page,
                            gint        position,
                            EphyWindow *window)
 {
-  GtkWidget *content = hdy_tab_page_get_child (page);
+  GtkWidget *content = adw_tab_page_get_child (page);
 
   LOG ("page-detached tab view %p embed %p position %d\n", tab_view, content, position);
 
@@ -2786,19 +2793,19 @@ ephy_window_close_tab (EphyWindow *window,
    * tab, even if it wasn't at the start of this function.
    */
   if (!window->closing && ephy_tab_view_get_n_pages (window->tab_view) == 0)
-    gtk_widget_destroy (GTK_WIDGET (window));
+    gtk_window_destroy (GTK_WINDOW (window));
 }
 
 typedef struct {
   EphyWindow *window;
   EphyEmbed *embed;
-  HdyTabPage *page;
+  AdwTabPage *page;
 } TabHasModifiedFormsData;
 
 static TabHasModifiedFormsData *
 tab_has_modified_forms_data_new (EphyWindow *window,
                                  EphyEmbed  *embed,
-                                 HdyTabPage *page)
+                                 AdwTabPage *page)
 {
   TabHasModifiedFormsData *data = g_new (TabHasModifiedFormsData, 1);
   data->window = window;
@@ -2823,9 +2830,9 @@ tab_has_modified_forms_dialog_cb (GtkDialog               *dialog,
                                   GtkResponseType          response,
                                   TabHasModifiedFormsData *data)
 {
-  HdyTabView *tab_view = ephy_tab_view_get_tab_view (data->window->tab_view);
+  AdwTabView *tab_view = ephy_tab_view_get_tab_view (data->window->tab_view);
 
-  gtk_widget_destroy (GTK_WIDGET (dialog));
+  gtk_window_destroy (GTK_WINDOW (dialog));
 
   if (response == GTK_RESPONSE_ACCEPT) {
     /* It's safe to close the tab immediately because we are only checking a
@@ -2833,10 +2840,10 @@ tab_has_modified_forms_dialog_cb (GtkDialog               *dialog,
      * codepath for checking modified forms when closing the whole window,
      * see ephy_window_check_modified_forms().
      */
-    hdy_tab_view_close_page_finish (tab_view, data->page, TRUE);
+    adw_tab_view_close_page_finish (tab_view, data->page, TRUE);
     ephy_window_close_tab (data->window, data->embed);
   } else
-    hdy_tab_view_close_page_finish (tab_view, data->page, FALSE);
+    adw_tab_view_close_page_finish (tab_view, data->page, FALSE);
 
   tab_has_modified_forms_data_free (data);
 }
@@ -2853,10 +2860,10 @@ tab_has_modified_forms_cb (EphyWebView             *view,
   if (data->window != NULL &&
       data->embed != NULL &&
       data->page != NULL) {
-    HdyTabView *tab_view = ephy_tab_view_get_tab_view (data->window->tab_view);
+    AdwTabView *tab_view = ephy_tab_view_get_tab_view (data->window->tab_view);
 
     if (!has_modified_forms) {
-      hdy_tab_view_close_page_finish (tab_view, data->page, TRUE);
+      adw_tab_view_close_page_finish (tab_view, data->page, TRUE);
       ephy_window_close_tab (data->window, data->embed);
     } else {
       GtkWidget *dialog;
@@ -2900,19 +2907,19 @@ run_downloads_in_background (EphyWindow *window,
 }
 
 static gboolean
-tab_view_close_page_cb (HdyTabView *tab_view,
-                        HdyTabPage *page,
+tab_view_close_page_cb (AdwTabView *tab_view,
+                        AdwTabPage *page,
                         EphyWindow *window)
 {
-  EphyEmbed *embed = EPHY_EMBED (hdy_tab_page_get_child (page));
+  EphyEmbed *embed = EPHY_EMBED (adw_tab_page_get_child (page));
 
-  if (hdy_tab_page_get_pinned (page))
+  if (adw_tab_page_get_pinned (page))
     return GDK_EVENT_PROPAGATE;
 
   if (ephy_tab_view_get_n_pages (window->tab_view) == 1) {
     if (g_settings_get_boolean (EPHY_SETTINGS_LOCKDOWN,
                                 EPHY_PREFS_LOCKDOWN_QUIT)) {
-      hdy_tab_view_close_page_finish (tab_view, page, FALSE);
+      adw_tab_view_close_page_finish (tab_view, page, FALSE);
       return GDK_EVENT_STOP;
     }
 
@@ -2928,7 +2935,7 @@ tab_view_close_page_cb (HdyTabView *tab_view,
       if (ephy_downloads_manager_has_active_downloads (manager)) {
         GList *list = ephy_downloads_manager_get_downloads (manager);
         run_downloads_in_background (window, g_list_length (list));
-        hdy_tab_view_close_page_finish (tab_view, page, FALSE);
+        adw_tab_view_close_page_finish (tab_view, page, FALSE);
         return GDK_EVENT_STOP;
       }
     }
@@ -2957,8 +2964,8 @@ tab_view_close_page_cb (HdyTabView *tab_view,
   return GDK_EVENT_PROPAGATE;
 }
 
-static HdyTabView *
-tab_view_create_window_cb (HdyTabView *tab_view,
+static AdwTabView *
+tab_view_create_window_cb (AdwTabView *tab_view,
                            EphyWindow *window)
 {
   EphyWindow *new_window;
@@ -2966,7 +2973,6 @@ tab_view_create_window_cb (HdyTabView *tab_view,
   new_window = ephy_window_new ();
 
   new_window->present_on_insert = TRUE;
-  new_window->present_on_insert_user_time = gtk_get_current_event_time ();
 
   return ephy_tab_view_get_tab_view (new_window->tab_view);
 }
@@ -2985,11 +2991,13 @@ ephy_window_update_entry_focus (EphyWindow  *window,
       !ephy_web_view_is_overview (view))
     return;
 
+/*
   title_widget = GTK_WIDGET (ephy_header_bar_get_title_widget (EPHY_HEADER_BAR (window->header_bar)));
   if (EPHY_IS_LOCATION_ENTRY (title_widget)) {
     entry = ephy_location_entry_get_entry (EPHY_LOCATION_ENTRY (title_widget));
     gtk_entry_grab_focus_without_selecting (GTK_ENTRY (entry));
   }
+*/
 }
 
 static void
@@ -3030,13 +3038,14 @@ static EphyTabView *
 setup_tab_view (EphyWindow *window)
 {
   EphyTabView *tab_view = ephy_tab_view_new ();
-  HdyTabView *view = ephy_tab_view_get_tab_view (tab_view);
+  AdwTabView *view = ephy_tab_view_get_tab_view (tab_view);
   g_autoptr (GtkBuilder) builder = NULL;
 
+  gtk_widget_set_vexpand (GTK_WIDGET (tab_view), TRUE);
+
   builder = gtk_builder_new_from_resource ("/org/gnome/epiphany/gtk/notebook-context-menu.ui");
 
-  hdy_tab_view_set_menu_model (view, G_MENU_MODEL (gtk_builder_get_object (builder, "notebook-menu")));
-  hdy_tab_view_set_shortcut_widget (view, GTK_WIDGET (window));
+  adw_tab_view_set_menu_model (view, G_MENU_MODEL (gtk_builder_get_object (builder, "notebook-menu")));
 
   g_signal_connect_object (view, "notify::selected-page",
                            G_CALLBACK (tab_view_notify_selected_page_cb),
@@ -3152,6 +3161,7 @@ ephy_window_get_property (GObject    *object,
   }
 }
 
+#if 0
 static gboolean
 ephy_window_state_event (GtkWidget           *widget,
                          GdkEventWindowState *event)
@@ -3193,6 +3203,7 @@ ephy_window_state_event (GtkWidget           *widget,
 
   return result;
 }
+#endif
 
 void
 ephy_window_set_default_size (EphyWindow *window,
@@ -3208,10 +3219,11 @@ ephy_window_set_default_position (EphyWindow *window,
                                   gint        x,
                                   gint        y)
 {
-  gtk_window_move (GTK_WINDOW (window), x, y);
+//  gtk_window_move (GTK_WINDOW (window), x, y);
   window->has_default_position = TRUE;
 }
 
+#if 0
 static void
 ephy_window_show (GtkWidget *widget)
 {
@@ -3292,6 +3304,7 @@ ephy_window_destroy (GtkWidget *widget)
 
   GTK_WIDGET_CLASS (ephy_window_parent_class)->destroy (widget);
 }
+#endif
 
 static void
 ephy_window_finalize (GObject *object)
@@ -3301,6 +3314,7 @@ ephy_window_finalize (GObject *object)
   LOG ("EphyWindow finalised %p", object);
 }
 
+#if 0
 static void
 sync_user_input_cb (EphyLocationController *action,
                     GParamSpec             *pspec,
@@ -3368,28 +3382,21 @@ setup_header_bar (EphyWindow *window)
   GtkWidget *header_bar;
   EphyTitleWidget *title_widget;
 
-  window->window_handle = hdy_window_handle_new ();
   header_bar = ephy_header_bar_new (window);
 
-  gtk_container_add (GTK_CONTAINER (window->window_handle), header_bar);
-
-  gtk_widget_show (window->window_handle);
-  gtk_widget_show (header_bar);
-
-  gtk_style_context_add_class (gtk_widget_get_style_context (header_bar), "titlebar");
-
   title_widget = ephy_header_bar_get_title_widget (EPHY_HEADER_BAR (header_bar));
   g_signal_connect (title_widget, "lock-clicked",
                     G_CALLBACK (title_widget_lock_clicked_cb), window);
 
   return header_bar;
 }
+#endif
 
 static void
 update_pages_menu_revealer (EphyWindow *window)
 {
   gtk_revealer_set_reveal_child (window->pages_menu_revealer,
-                                 hdy_tab_bar_get_is_overflowing (window->tab_bar) ||
+                                 adw_tab_bar_get_is_overflowing (window->tab_bar) ||
                                  gtk_widget_get_visible (GTK_WIDGET (window->pages_popover)));
 }
 
@@ -3403,21 +3410,21 @@ setup_tabs_menu (EphyWindow *window)
   revealer = GTK_REVEALER (gtk_revealer_new ());
   gtk_revealer_set_transition_type (revealer,
                                     GTK_REVEALER_TRANSITION_TYPE_SLIDE_LEFT);
-  hdy_tab_bar_set_end_action_widget (window->tab_bar, GTK_WIDGET (revealer));
+  adw_tab_bar_set_end_action_widget (window->tab_bar, GTK_WIDGET (revealer));
   window->pages_menu_revealer = revealer;
 
   menu_button = gtk_menu_button_new ();
-  gtk_button_set_relief (GTK_BUTTON (menu_button), GTK_RELIEF_NONE);
+  gtk_widget_add_css_class (menu_button, "flat");
   /* Translators: tooltip for the tab switcher menu button */
   gtk_widget_set_tooltip_text (menu_button, _("View open tabs"));
   gtk_widget_set_margin_start (menu_button, 1);
-  gtk_container_add (GTK_CONTAINER (revealer), menu_button);
+  gtk_revealer_set_child (revealer, menu_button);
 
-  popover = ephy_pages_popover_new (menu_button);
-  ephy_pages_popover_set_tab_view (popover, window->tab_view);
-  gtk_menu_button_set_popover (GTK_MENU_BUTTON (menu_button),
-                               GTK_WIDGET (popover));
-  window->pages_popover = popover;
+//  popover = ephy_pages_popover_new (menu_button);
+//  ephy_pages_popover_set_tab_view (popover, window->tab_view);
+//  gtk_menu_button_set_popover (GTK_MENU_BUTTON (menu_button),
+//                               GTK_WIDGET (popover));
+//  window->pages_popover = popover;
 
   g_signal_connect_object (window->tab_bar, "notify::is-overflowing",
                            G_CALLBACK (update_pages_menu_revealer), window,
@@ -3425,10 +3432,9 @@ setup_tabs_menu (EphyWindow *window)
   g_signal_connect_object (window->pages_popover, "notify::visible",
                            G_CALLBACK (update_pages_menu_revealer), window,
                            G_CONNECT_SWAPPED);
-
-  gtk_widget_show_all (GTK_WIDGET (revealer));
 }
 
+#if 0
 static EphyLocationController *
 setup_location_controller (EphyWindow    *window,
                            EphyHeaderBar *header_bar)
@@ -3454,7 +3460,6 @@ setup_action_bar (EphyWindow *window)
   GtkWidget *action_bar;
 
   action_bar = GTK_WIDGET (ephy_action_bar_new (window));
-  gtk_widget_show (action_bar);
 
   g_object_bind_property (window->fullscreen_box, "revealed",
                           action_bar, "can-reveal",
@@ -3462,6 +3467,7 @@ setup_action_bar (EphyWindow *window)
 
   return action_bar;
 }
+#endif
 
 static const char *disabled_actions_for_app_mode[] = {
   "open",
@@ -3518,6 +3524,7 @@ set_as_default_browser ()
   }
 }
 
+#if 0
 static void
 on_default_browser_question_response (GtkInfoBar *info_bar,
                                       gint        response_id,
@@ -3559,9 +3566,8 @@ add_default_browser_question (GtkBox *box)
   g_signal_connect (info_bar, "response", G_CALLBACK (on_default_browser_question_response), NULL);
 
   gtk_box_pack_start (box, info_bar, FALSE, FALSE, 0);
-
-  gtk_widget_show (info_bar);
 }
+#endif
 
 static gboolean
 is_browser_default (void)
@@ -3596,14 +3602,15 @@ download_completed_cb (EphyDownload *download,
     g_application_quit (G_APPLICATION (shell));
 }
 
+#if 0
 static void
-notify_deck_child_cb (EphyWindow *window)
+notify_leaflet_child_cb (EphyWindow *window)
 {
   GActionGroup *action_group;
   GAction *action;
   gboolean pages_open;
 
-  pages_open = hdy_deck_get_visible_child (HDY_DECK (window->main_deck)) == GTK_WIDGET (window->pages_view);
+  pages_open = adw_leaflet_get_visible_child (ADW_LEAFLET (window->main_leaflet)) == GTK_WIDGET 
(window->pages_view);
   action_group = gtk_widget_get_action_group (GTK_WIDGET (window), "win");
 
   action = g_action_map_lookup_action (G_ACTION_MAP (action_group), "content");
@@ -3626,6 +3633,7 @@ ephy_window_size_allocate (GtkWidget     *widget,
 
   update_adaptive_mode (window);
 }
+#endif
 
 static void
 ephy_window_constructed (GObject *object)
@@ -3645,6 +3653,7 @@ ephy_window_constructed (GObject *object)
 
   window = EPHY_WINDOW (object);
 
+#if 0
   /* Add actions */
   simple_action_group = g_simple_action_group_new ();
   g_action_map_add_action_entries (G_ACTION_MAP (simple_action_group),
@@ -3707,22 +3716,24 @@ ephy_window_constructed (GObject *object)
                                            accels_navigation_ltr_rtl[i].action_and_target,
                                            accels_navigation_ltr_rtl[i].accelerators);
   }
+#endif
 
   ephy_gui_ensure_window_group (GTK_WINDOW (window));
 
   window->tab_view = setup_tab_view (window);
-  window->tab_bar = hdy_tab_bar_new ();
+  window->tab_bar = adw_tab_bar_new ();
   window->tab_bar_revealer = GTK_REVEALER (gtk_revealer_new ());
-  window->main_deck = hdy_deck_new ();
+  window->main_leaflet = adw_leaflet_new ();
   window->fullscreen_box = ephy_fullscreen_box_new ();
-  window->pages_view = ephy_pages_view_new ();
+//  window->pages_view = ephy_pages_view_new ();
 
-  g_signal_connect_swapped (window->main_deck, "notify::visible-child",
-                            G_CALLBACK (notify_deck_child_cb), window);
+  adw_leaflet_set_can_unfold (ADW_LEAFLET (window->main_leaflet), FALSE);
+//  g_signal_connect_swapped (window->main_leaflet, "notify::visible-child",
+//                            G_CALLBACK (notify_leaflet_child_cb), window);
 
   gtk_revealer_set_transition_type (window->tab_bar_revealer, GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN);
-  hdy_tab_bar_set_view (window->tab_bar, ephy_tab_view_get_tab_view (window->tab_view));
-  ephy_pages_view_set_tab_view (window->pages_view, window->tab_view);
+  adw_tab_bar_set_view (window->tab_bar, ephy_tab_view_get_tab_view (window->tab_view));
+//  ephy_pages_view_set_tab_view (window->pages_view, window->tab_view);
 
   setup_tabs_menu (window);
 
@@ -3736,42 +3747,35 @@ ephy_window_constructed (GObject *object)
     gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (window)), "automation-mode");
 
   /* Setup the toolbar. */
-  window->header_bar = setup_header_bar (window);
-  window->location_controller = setup_location_controller (window, EPHY_HEADER_BAR (window->header_bar));
-  window->action_bar = setup_action_bar (window);
+//  window->header_bar = setup_header_bar (window);
+//  window->location_controller = setup_location_controller (window, EPHY_HEADER_BAR (window->header_bar));
+//  window->action_bar = setup_action_bar (window);
   box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 0));
   window->titlebar_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 0));
 
-  if (g_settings_get_boolean (EPHY_SETTINGS_MAIN, EPHY_PREFS_ASK_FOR_DEFAULT) &&
-      !is_browser_default () &&
-      !ephy_profile_dir_is_web_application ())
-    add_default_browser_question (box);
-
-  gtk_container_add (GTK_CONTAINER (window->tab_bar_revealer), GTK_WIDGET (window->tab_bar));
-  gtk_box_pack_start (window->titlebar_box, GTK_WIDGET (window->window_handle), FALSE, TRUE, 0);
-  gtk_box_pack_start (window->titlebar_box, GTK_WIDGET (window->tab_bar_revealer), FALSE, TRUE, 0);
-  gtk_box_pack_start (box, GTK_WIDGET (window->tab_view), TRUE, TRUE, 0);
-  gtk_box_pack_start (box, GTK_WIDGET (window->action_bar), FALSE, TRUE, 0);
-  gtk_container_add (GTK_CONTAINER (window->fullscreen_box), GTK_WIDGET (box));
+//  if (g_settings_get_boolean (EPHY_SETTINGS_MAIN, EPHY_PREFS_ASK_FOR_DEFAULT) &&
+//      !is_browser_default () &&
+//      !ephy_profile_dir_is_web_application ())
+//    add_default_browser_question (box);
+
+  gtk_revealer_set_child (window->tab_bar_revealer, GTK_WIDGET (window->tab_bar));
+  gtk_box_append (window->titlebar_box, GTK_WIDGET (window->header_bar));
+  gtk_box_append (window->titlebar_box, GTK_WIDGET (window->tab_bar_revealer));
+  gtk_box_append (box, GTK_WIDGET (window->tab_view));
+  gtk_box_append (box, GTK_WIDGET (window->action_bar));
+  ephy_fullscreen_box_set_content (window->fullscreen_box, GTK_WIDGET (box));
   ephy_fullscreen_box_set_titlebar (window->fullscreen_box, GTK_WIDGET (window->titlebar_box));
 
-  gtk_container_add (GTK_CONTAINER (window->main_deck), GTK_WIDGET (window->fullscreen_box));
-  gtk_container_add (GTK_CONTAINER (window->main_deck), GTK_WIDGET (window->pages_view));
-  gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (window->main_deck));
-  gtk_widget_show (GTK_WIDGET (window->main_deck));
-  gtk_widget_show (GTK_WIDGET (window->pages_view));
-  gtk_widget_show (GTK_WIDGET (window->fullscreen_box));
-  gtk_widget_show (GTK_WIDGET (window->titlebar_box));
-  gtk_widget_show (GTK_WIDGET (box));
-  gtk_widget_show (GTK_WIDGET (window->tab_view));
-  gtk_widget_show (GTK_WIDGET (window->tab_bar));
-  gtk_widget_show (GTK_WIDGET (window->tab_bar_revealer));
+  adw_leaflet_append (ADW_LEAFLET (window->main_leaflet), GTK_WIDGET (window->fullscreen_box));
+//  adw_leaflet_append (ADW_LEAFLET (window->main_leaflet), GTK_WIDGET (window->pages_view));
+  adw_application_window_set_content (ADW_APPLICATION_WINDOW (window), GTK_WIDGET (window->main_leaflet));
 
   ephy_tab_view_set_tab_bar (window->tab_view, window->tab_bar);
 
-  hdy_deck_set_visible_child (HDY_DECK (window->main_deck), GTK_WIDGET (window->fullscreen_box));
-  hdy_deck_set_can_swipe_back (HDY_DECK (window->main_deck), TRUE);
+  adw_leaflet_set_visible_child (ADW_LEAFLET (window->main_leaflet), GTK_WIDGET (window->fullscreen_box));
+  adw_leaflet_set_can_navigate_back (ADW_LEAFLET (window->main_leaflet), TRUE);
 
+#if 0
   /* other notifiers */
   action_group = gtk_widget_get_action_group (GTK_WIDGET (window), "win");
   action = g_action_map_lookup_action (G_ACTION_MAP (action_group),
@@ -3832,10 +3836,11 @@ ephy_window_constructed (GObject *object)
   }
 
   window->mouse_gesture_controller = ephy_mouse_gesture_controller_new (window);
+#endif
 
   ephy_window_set_chrome (window, chrome);
 
-  ephy_web_extension_manager_install_actions (ephy_shell_get_web_extension_manager (ephy_shell_get_default 
()), window);
+//  ephy_web_extension_manager_install_actions (ephy_shell_get_web_extension_manager (ephy_shell_get_default 
()), window);
 }
 
 static void
@@ -3851,12 +3856,12 @@ ephy_window_class_init (EphyWindowClass *klass)
   object_class->get_property = ephy_window_get_property;
   object_class->set_property = ephy_window_set_property;
 
-  widget_class->key_press_event = ephy_window_key_press_event;
-  widget_class->window_state_event = ephy_window_state_event;
-  widget_class->show = ephy_window_show;
-  widget_class->destroy = ephy_window_destroy;
-  widget_class->delete_event = ephy_window_delete_event;
-  widget_class->size_allocate = ephy_window_size_allocate;
+//  widget_class->key_press_event = ephy_window_key_press_event;
+//  widget_class->window_state_event = ephy_window_state_event;
+//  widget_class->show = ephy_window_show;
+//  widget_class->destroy = ephy_window_destroy;
+//  widget_class->delete_event = ephy_window_delete_event;
+//  widget_class->size_allocate = ephy_window_size_allocate;
 
   g_object_class_override_property (object_class,
                                     PROP_ACTIVE_CHILD,
@@ -3941,7 +3946,7 @@ ephy_window_open_pages_view (EphyWindow *window)
 {
   g_assert (EPHY_IS_WINDOW (window));
 
-  hdy_deck_navigate (HDY_DECK (window->main_deck), HDY_NAVIGATION_DIRECTION_FORWARD);
+  adw_leaflet_navigate (ADW_LEAFLET (window->main_leaflet), ADW_NAVIGATION_DIRECTION_FORWARD);
 }
 
 /**
@@ -3955,7 +3960,7 @@ ephy_window_close_pages_view (EphyWindow *window)
 {
   g_assert (EPHY_IS_WINDOW (window));
 
-  hdy_deck_navigate (HDY_DECK (window->main_deck), HDY_NAVIGATION_DIRECTION_BACK);
+  adw_leaflet_navigate (ADW_LEAFLET (window->main_leaflet), ADW_NAVIGATION_DIRECTION_BACK);
 }
 
 /**
@@ -4007,12 +4012,13 @@ ephy_window_activate_location (EphyWindow *window)
   if (!(window->chrome & EPHY_WINDOW_CHROME_LOCATION))
     return;
 
-  title_widget = ephy_header_bar_get_title_widget (EPHY_HEADER_BAR (window->header_bar));
+//  title_widget = ephy_header_bar_get_title_widget (EPHY_HEADER_BAR (window->header_bar));
 
-  if (EPHY_IS_LOCATION_ENTRY (title_widget))
-    ephy_location_entry_focus (EPHY_LOCATION_ENTRY (title_widget));
+//  if (EPHY_IS_LOCATION_ENTRY (title_widget))
+//    ephy_location_entry_focus (EPHY_LOCATION_ENTRY (title_widget));
 }
 
+#if 0
 /**
  * ephy_window_location_search:
  * @window: an #EphyWindow
@@ -4158,6 +4164,7 @@ ephy_window_get_header_bar (EphyWindow *window)
 {
   return window->header_bar;
 }
+#endif
 
 typedef struct {
   EphyWindow *window;
@@ -4184,7 +4191,7 @@ finish_window_close_after_modified_forms_check (WindowHasModifiedFormsData *data
   should_close = ephy_window_close (data->window);
   data->window->force_close = FALSE;
   if (should_close)
-    gtk_widget_destroy (GTK_WIDGET (data->window));
+    gtk_window_destroy (GTK_WINDOW (data->window));
 
   window_has_modified_forms_data_free (data);
 }
@@ -4194,7 +4201,7 @@ confirm_close_window_with_modified_forms_cb (GtkDialog                  *dialog,
                                              GtkResponseType             response,
                                              WindowHasModifiedFormsData *data)
 {
-  gtk_widget_destroy (GTK_WIDGET (dialog));
+  gtk_window_destroy (GTK_WINDOW (dialog));
 
   if (response == GTK_RESPONSE_ACCEPT)
     finish_window_close_after_modified_forms_check (data);
@@ -4299,7 +4306,7 @@ window_close_with_multiple_tabs_cb (GtkDialog       *dialog,
                                     GtkResponseType  response,
                                     EphyWindow      *window)
 {
-  gtk_widget_destroy (GTK_WIDGET (dialog));
+  gtk_window_destroy (GTK_WINDOW (dialog));
 
   if (response == GTK_RESPONSE_ACCEPT) {
     window->confirmed_close_with_multiple_tabs = TRUE;
diff --git a/src/ephy-window.h b/src/ephy-window.h
index 35997a3d9..bee8e20c5 100644
--- a/src/ephy-window.h
+++ b/src/ephy-window.h
@@ -27,13 +27,13 @@
 #include "ephy-tab-view.h"
 #include "ephy-web-view.h"
 
-#include <handy.h>
+#include <adwaita.h>
 
 G_BEGIN_DECLS
 
 #define EPHY_TYPE_WINDOW (ephy_window_get_type ())
 
-G_DECLARE_FINAL_TYPE (EphyWindow, ephy_window, EPHY, WINDOW, HdyApplicationWindow)
+G_DECLARE_FINAL_TYPE (EphyWindow, ephy_window, EPHY, WINDOW, AdwApplicationWindow)
 
 typedef enum
 {
diff --git a/src/meson.build b/src/meson.build
index 30248f58c..6a4fdde4e 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -1,5 +1,5 @@
 types_headers = [
-  'bookmarks/ephy-bookmark-properties.h',
+#  'bookmarks/ephy-bookmark-properties.h',
   'ephy-link.h',
   'ephy-session.h',
   'ephy-shell.h',
@@ -10,57 +10,57 @@ enums = gnome.mkenums_simple('ephy-type-builtins',
   sources: types_headers
 )
 
-subdir('webextension')
+#subdir('webextension')
 
 libephymain_sources = [
-  'bookmarks/ephy-add-bookmark-popover.c',
+#  'bookmarks/ephy-add-bookmark-popover.c',
   'bookmarks/ephy-bookmark.c',
-  'bookmarks/ephy-bookmark-properties.c',
-  'bookmarks/ephy-bookmark-row.c',
+#  'bookmarks/ephy-bookmark-properties.c',
+#  'bookmarks/ephy-bookmark-row.c',
   'bookmarks/ephy-bookmarks-export.c',
   'bookmarks/ephy-bookmarks-import.c',
   'bookmarks/ephy-bookmarks-manager.c',
-  'bookmarks/ephy-bookmarks-popover.c',
-  'ephy-action-bar.c',
-  'ephy-action-bar-end.c',
-  'ephy-action-bar-start.c',
+#  'bookmarks/ephy-bookmarks-popover.c',
+#  'ephy-action-bar.c',
+#  'ephy-action-bar-end.c',
+#  'ephy-action-bar-start.c',
   'ephy-action-helper.c',
   'ephy-desktop-utils.c',
-  'ephy-encoding-dialog.c',
-  'ephy-encoding-row.c',
-  'ephy-firefox-sync-dialog.c',
+#  'ephy-encoding-dialog.c',
+#  'ephy-encoding-row.c',
+#  'ephy-firefox-sync-dialog.c',
   'ephy-fullscreen-box.c',
-  'ephy-header-bar.c',
-  'ephy-history-dialog.c',
+#  'ephy-header-bar.c',
+#  'ephy-history-dialog.c',
   'ephy-link.c',
-  'ephy-location-controller.c',
-  'ephy-lockdown.c',
-  'ephy-mouse-gesture-controller.c',
-  'ephy-page-row.c',
-  'ephy-pages-button.c',
-  'ephy-pages-popover.c',
-  'ephy-pages-view.c',
+#  'ephy-location-controller.c',
+#  'ephy-lockdown.c',
+#  'ephy-mouse-gesture-controller.c',
+#  'ephy-page-row.c',
+#  'ephy-pages-button.c',
+#  'ephy-pages-popover.c',
+#  'ephy-pages-view.c',
   'ephy-session.c',
   'ephy-shell.c',
-  'ephy-suggestion-model.c',
+#  'ephy-suggestion-model.c',
   'ephy-tab-view.c',
-  'ephy-web-extension-dialog.c',
+#  'ephy-web-extension-dialog.c',
   'ephy-window.c',
-  'popup-commands.c',
-  'preferences/clear-data-view.c',
-  'preferences/ephy-data-view.c',
-  'preferences/ephy-lang-row.c',
-  'preferences/ephy-prefs-dialog.c',
-  'preferences/passwords-view.c',
-  'preferences/ephy-search-engine-listbox.c',
-  'preferences/ephy-search-engine-row.c',
-  'preferences/prefs-appearance-page.c',
-  'preferences/prefs-general-page.c',
-  'preferences/prefs-privacy-page.c',
-  'preferences/webapp-additional-urls-dialog.c',
-  'synced-tabs-dialog.c',
-  'window-commands.c',
-  ephywebextension_src,
+#  'popup-commands.c',
+#  'preferences/clear-data-view.c',
+#  'preferences/ephy-data-view.c',
+#  'preferences/ephy-lang-row.c',
+#  'preferences/ephy-prefs-dialog.c',
+#  'preferences/passwords-view.c',
+#  'preferences/ephy-search-engine-listbox.c',
+#  'preferences/ephy-search-engine-row.c',
+#  'preferences/prefs-appearance-page.c',
+#  'preferences/prefs-general-page.c',
+#  'preferences/prefs-privacy-page.c',
+#  'preferences/webapp-additional-urls-dialog.c',
+#  'synced-tabs-dialog.c',
+#  'window-commands.c',
+#  ephywebextension_src,
   compile_schemas,
   enums
 ]
@@ -123,13 +123,13 @@ search_provider_sources = [
   codegen
 ]
 
-executable('epiphany-search-provider',
-  search_provider_sources,
-  dependencies: ephymain_dep,
-  install: true,
-  install_dir: libexecdir,
-  install_rpath: pkglibdir
-)
+#executable('epiphany-search-provider',
+#  search_provider_sources,
+#  dependencies: ephymain_dep,
+#  install: true,
+#  install_dir: libexecdir,
+#  install_rpath: pkglibdir
+#)
 
 
 resource_files = files('resources/epiphany.gresource.xml')
diff --git a/src/resources/gtk/action-bar-start.ui b/src/resources/gtk/action-bar-start.ui
index e604b9601..fa7a1ce5e 100644
--- a/src/resources/gtk/action-bar-start.ui
+++ b/src/resources/gtk/action-bar-start.ui
@@ -4,7 +4,6 @@
     <property name="spacing">6</property>
     <child>
       <object class="GtkBox" id="navigation_box">
-        <property name="visible">True</property>
         <property name="orientation">horizontal</property>
         <style>
           <class name="linked"/>
@@ -12,103 +11,46 @@
         </style>
         <child>
           <object class="GtkButton" id="navigation_back">
-            <property name="visible">True</property>
             <property name="action-name">toolbar.navigation-back</property>
-            <property name="valign">center</property>
+            <property name="icon-name">go-previous-symbolic</property>
             <!-- Translators: tooltip for the back button -->
             <property name="tooltip_text" translatable="yes">Go back to the previous page</property>
-            <style>
-              <class name="image-button"/>
-            </style>
-            <child>
-              <object class="GtkImage" id="back_image">
-                <property name="visible">True</property>
-                <property name="icon-name">go-previous-symbolic</property>
-                <property name="icon-size">1</property>
-              </object>
-            </child>
           </object>
         </child>
         <child>
           <object class="GtkButton" id="navigation_forward">
-            <property name="visible">True</property>
             <property name="action-name">toolbar.navigation-forward</property>
-            <property name="valign">center</property>
+            <property name="icon-name">go-next-symbolic</property>
             <!-- Translators: tooltip for the forward button -->
             <property name="tooltip_text" translatable="yes">Go forward to the next page</property>
-            <style>
-              <class name="image-button"/>
-            </style>
-            <child>
-              <object class="GtkImage" id="forward_image">
-                <property name="visible">True</property>
-                <property name="icon-name">go-next-symbolic</property>
-                <property name="icon-size">1</property>
-              </object>
-            </child>
           </object>
         </child>
       </object>
     </child>
     <child>
       <object class="GtkButton" id="combined_stop_reload_button">
-        <property name="visible">True</property>
         <property name="action-name">toolbar.combined-stop-reload</property>
-        <property name="valign">center</property>
-        <style>
-          <class name="image-button"/>
-        </style>
-        <child>
-          <object class="GtkImage" id="combined_stop_reload_image">
-            <property name="visible">True</property>
-            <property name="icon-name">view-refresh-symbolic</property>
-            <property name="icon-size">1</property>
-          </object>
-        </child>
+        <property name="icon-name">view-refresh-symbolic</property>
       </object>
     </child>
     <child>
       <object class="GtkButton" id="homepage_button">
-        <property name="visible">True</property>
         <property name="action-name">win.home</property>
-        <property name="valign">center</property>
+        <property name="icon-name">go-home-symbolic</property>
         <!-- Translators: tooltip for the secret homepage button -->
         <property name="tooltip_text" translatable="yes">Go to your homepage</property>
-        <style>
-          <class name="image-button"/>
-        </style>
-        <child>
-          <object class="GtkImage" id="homepage_image">
-            <property name="visible">True</property>
-            <property name="icon-name">go-home-symbolic</property>
-            <property name="icon-size">1</property>
-          </object>
-        </child>
       </object>
     </child>
     <child>
       <object class="GtkButton" id="new_tab_button">
-        <property name="visible">True</property>
         <property name="action-name">win.new-tab</property>
-        <property name="valign">center</property>
+        <property name="icon-name">tab-new-symbolic</property>
         <!-- Translators: tooltip for the new tab button -->
         <property name="tooltip_text" translatable="yes">Open a new tab</property>
-        <style>
-          <class name="image-button"/>
-        </style>
-        <child>
-          <object class="GtkImage" id="new_tab_image">
-            <property name="visible">True</property>
-            <property name="icon-name">tab-new-symbolic</property>
-            <property name="icon-size">1</property>
-          </object>
-        </child>
       </object>
     </child>
     <child>
-      <object class="GtkBox" id="placeholder">
-        <property name="visible">True</property>
-      </object>
+      <object class="GtkBox" id="placeholder"/>
     </child>
   </template>
 </interface>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]