diff --git a/SOURCES/0001-gdk-x11-Clamp-window-size-both-when-creating-and-res.patch b/SOURCES/0001-gdk-x11-Clamp-window-size-both-when-creating-and-res.patch
new file mode 100644
index 0000000..b4667df
--- /dev/null
+++ b/SOURCES/0001-gdk-x11-Clamp-window-size-both-when-creating-and-res.patch
@@ -0,0 +1,75 @@
+From 9dd198e53f53a9c2e4a791ec5b67b3ffa7b3900b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
+Date: Tue, 6 Aug 2019 11:13:55 +0200
+Subject: [PATCH] gdk/x11: Clamp window size both when creating and resizing
+
+We clamp to 32767 when creating a new X11 GdkWindow due to larger sizes
+not being supported, but still try to resize to larger when
+gdk_window_resize() is called. Fix this by clamping in both places.
+
+This fixes an issue in mutter where ridiculously sized Java windows
+would not show up.
+---
+ gdk/x11/gdkwindow-x11.c | 32 ++++++++++++++++++++++----------
+ 1 file changed, 22 insertions(+), 10 deletions(-)
+
+diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
+index f92a146be5..4de412315d 100644
+--- a/gdk/x11/gdkwindow-x11.c
++++ b/gdk/x11/gdkwindow-x11.c
+@@ -1003,6 +1003,25 @@ connect_frame_clock (GdkWindow *window)
+     }
+ }
+ 
++static void
++clamp_window_size (GdkWindow *window,
++                   gint      *width,
++                   gint      *height)
++{
++  GdkWindowImplX11 *impl = GDK_WINDOW_IMPL_X11 (window->impl);
++
++  if (*width * impl->window_scale > 32767 ||
++      *height * impl->window_scale > 32767)
++    {
++      g_warning ("Native Windows wider or taller than 32767 pixels are not supported");
++
++      if (*width * impl->window_scale > 32767)
++        *width = 32767 / impl->window_scale;
++      if (*height  * impl->window_scale > 32767)
++        *height = 32767 /  impl->window_scale;
++    }
++}
++
+ void
+ _gdk_x11_display_create_window_impl (GdkDisplay    *display,
+                                      GdkWindow     *window,
+@@ -1101,16 +1120,7 @@ _gdk_x11_display_create_window_impl (GdkDisplay    *display,
+       class = InputOnly;
+     }
+ 
+-  if (window->width * impl->window_scale > 32767 ||
+-      window->height * impl->window_scale > 32767)
+-    {
+-      g_warning ("Native Windows wider or taller than 32767 pixels are not supported");
+-
+-      if (window->width * impl->window_scale > 32767)
+-        window->width = 32767 / impl->window_scale;
+-      if (window->height  * impl->window_scale > 32767)
+-        window->height = 32767 /  impl->window_scale;
+-    }
++  clamp_window_size (window, &window->width, &window->height);
+ 
+   impl->unscaled_width = window->width * impl->window_scale;
+   impl->unscaled_height = window->height * impl->window_scale;
+@@ -1909,6 +1919,8 @@ gdk_window_x11_move_resize (GdkWindow *window,
+     window_x11_move (window, x, y);
+   else
+     {
++      clamp_window_size (window, &width, &height);
++
+       if (with_move)
+         window_x11_move_resize (window, x, y, width, height);
+       else
+-- 
+2.21.0
+
diff --git a/SOURCES/0001-gtk-icon-theme-Handle-lack-of-SVG-loader-gracefully.patch b/SOURCES/0001-gtk-icon-theme-Handle-lack-of-SVG-loader-gracefully.patch
new file mode 100644
index 0000000..9408fd4
--- /dev/null
+++ b/SOURCES/0001-gtk-icon-theme-Handle-lack-of-SVG-loader-gracefully.patch
@@ -0,0 +1,43 @@
+From e08c019f6c01a797c3eef59d900fbe09fac9ddaf Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
+Date: Wed, 7 Aug 2019 19:17:44 +0200
+Subject: [PATCH] gtk/icon-theme: Handle lack of SVG loader gracefully
+
+When loading a SVG icon from a gresource file only containing SVG icons,
+but without having a SVG loader available in gdk-pixbuf, we would crash
+when trying to eventually load the resource. Fix this by gracefully
+handling this by simply failing to load the icon, while the first time
+it happens, log a warning.
+
+https://gitlab.gnome.org/GNOME/gtk/issues/2084
+---
+ gtk/gtkicontheme.c | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
+index 65c64b38e3..e5323defe8 100644
+--- a/gtk/gtkicontheme.c
++++ b/gtk/gtkicontheme.c
+@@ -1806,6 +1806,19 @@ real_choose_icon (GtkIconTheme       *icon_theme,
+         icon_info->filename = g_strdup (unthemed_icon->svg_filename);
+       else if (unthemed_icon->no_svg_filename)
+         icon_info->filename = g_strdup (unthemed_icon->no_svg_filename);
++      else
++        {
++          static gboolean warned_once = FALSE;
++
++          if (!warned_once)
++            {
++              g_warning ("Tried to load SVG only icon without SVG support");
++              warned_once = TRUE;
++            }
++
++          g_clear_object (&icon_info);
++          goto out;
++        }
+ 
+       if (unthemed_icon->is_resource)
+         {
+-- 
+2.21.0
+
diff --git a/SPECS/gtk3.spec b/SPECS/gtk3.spec
index ed6aed4..718157f 100644
--- a/SPECS/gtk3.spec
+++ b/SPECS/gtk3.spec
@@ -21,7 +21,7 @@
 
 Name: gtk3
 Version: 3.22.30
-Release: 3%{?dist}
+Release: 5%{?dist}
 Summary: GTK+ graphical user interface library
 
 License: LGPLv2+
@@ -39,6 +39,12 @@ Patch19: 0001-Add-_gtk_printer_get_hard_margins_for_paper_size.patch
 # https://bugzilla.redhat.com/show_bug.cgi?id=1571422
 Patch20: 0001-gdkseatdefault-Don-t-hide-GdkWindow-on-grab-failure.patch
 
+# https://bugzilla.redhat.com/show_bug.cgi?id=1687745
+Patch21: 0001-gdk-x11-Clamp-window-size-both-when-creating-and-res.patch
+
+# https://bugzilla.redhat.com/show_bug.cgi?id=1660642
+Patch22: 0001-gtk-icon-theme-Handle-lack-of-SVG-loader-gracefully.patch
+
 BuildRequires: pkgconfig(atk) >= %{atk_version}
 BuildRequires: pkgconfig(atk-bridge-2.0)
 BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version}
@@ -173,6 +179,8 @@ the functionality of the installed %{name} package.
 %patch18 -p1
 %patch19 -p1
 %patch20 -p1
+%patch21 -p1
+%patch22 -p1
 
 cp %{SOURCE1} po/
 
@@ -363,6 +371,14 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 %{_datadir}/installed-tests
 
 %changelog
+* Wed Aug 07 2019 Jonas Ådahl <jadahl@redhat.com> - 3.22.30-5
+- Handle lack of SVG loader gracefully
+- Resolves: #1660642
+
+* Tue Aug 06 2019 Jonas Ådahl <jadahl@redhat.com> - 3.22.30-4
+- Clamp X11 window size both when creating and resizing
+- Resolves: #1687745
+
 * Thu Jun 21 2018 Benjamin Otte <otte@redhat.com> - 3.22.30-3
 - Don't hide GdkWindow on grab failure
 - Resolves: #1571422