diff --git a/debian/changelog b/debian/changelog index 9776b4388a..9bf3b82376 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,15 @@ +gtk+3.0 (3.24.17-2) UNRELEASED; urgency=medium + + * d/p/Do-not-require-an-initial-configure-for-custom-Wayland-su.patch, + d/p/Do-not-require-an-initial-configure-for-DnD-windows.patch: + Apply patches from upstream gtk-3-24 branch to fix some Wayland + window-sizing regressions (partially resolves: #955820) + * d/p/wayland-don-t-call-gdk_wayland_window_configure-without-v.patch: + Apply a patch proposed upstream to fix additional Wayland window-sizing + regressions (hopefully resolves the rest of #955820) + + -- Simon McVittie Sun, 05 Apr 2020 20:12:51 +0100 + gtk+3.0 (3.24.17-1) unstable; urgency=medium * Team upload diff --git a/debian/patches/Do-not-require-an-initial-configure-for-DnD-windows.patch b/debian/patches/Do-not-require-an-initial-configure-for-DnD-windows.patch new file mode 100644 index 0000000000..0b4fe9b6f7 --- /dev/null +++ b/debian/patches/Do-not-require-an-initial-configure-for-DnD-windows.patch @@ -0,0 +1,27 @@ +From: William Wold +Date: Sun, 5 Apr 2020 07:11:45 -0400 +Subject: Do not require an initial configure for DnD windows + +Fixes #2075 + +Bug: https://gitlab.gnome.org/GNOME/gtk/-/issues/2575 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=955820 +Forwarded: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1633 +Applied-upstream: 3.24.18, commit:5a52af20cba76474e631b2a7548963bcad22d66d +--- + gdk/wayland/gdkwindow-wayland.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c +index 5f39c57..0450650 100644 +--- a/gdk/wayland/gdkwindow-wayland.c ++++ b/gdk/wayland/gdkwindow-wayland.c +@@ -1089,6 +1089,8 @@ needs_initial_configure (GdkWindow *window) + return FALSE; + else if (impl->use_custom_surface) + return FALSE; ++ else if (impl->hint == GDK_WINDOW_TYPE_HINT_DND) ++ return FALSE; + else if (is_realized_toplevel (window)) + return TRUE; + else if (is_realized_popup (window)) diff --git a/debian/patches/Do-not-require-an-initial-configure-for-custom-Wayland-su.patch b/debian/patches/Do-not-require-an-initial-configure-for-custom-Wayland-su.patch new file mode 100644 index 0000000000..f0c8c72f15 --- /dev/null +++ b/debian/patches/Do-not-require-an-initial-configure-for-custom-Wayland-su.patch @@ -0,0 +1,28 @@ +From: William Wold +Date: Sun, 5 Apr 2020 05:26:24 -0400 +Subject: Do not require an initial configure for custom Wayland surfaces + +There is no way for custom Wayland surfaces to get configure events, so an +initial configure event should not be required to resize a custom surface. + +Bug: https://gitlab.gnome.org/GNOME/gtk/-/issues/2578 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=955820 +Forwarded: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1633 +Applied-upstream: 3.24.18, commit:12fc9a45efcbb546eb7de13c5c4d3183f2f5a3b8 +--- + gdk/wayland/gdkwindow-wayland.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c +index eba8361..5f39c57 100644 +--- a/gdk/wayland/gdkwindow-wayland.c ++++ b/gdk/wayland/gdkwindow-wayland.c +@@ -1087,6 +1087,8 @@ needs_initial_configure (GdkWindow *window) + + if (impl->display_server.wl_subsurface) + return FALSE; ++ else if (impl->use_custom_surface) ++ return FALSE; + else if (is_realized_toplevel (window)) + return TRUE; + else if (is_realized_popup (window)) diff --git a/debian/patches/series b/debian/patches/series index 28b88e019e..e339103b4f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -8,3 +8,6 @@ reftest-known-fail.patch Disable-accessibility-dump-aka-a11ytests-test.patch updateiconcache-Sort-list-of-entries.patch build-Generate-gdk.gresource.xml-in-sorted-order.patch +Do-not-require-an-initial-configure-for-custom-Wayland-su.patch +Do-not-require-an-initial-configure-for-DnD-windows.patch +wayland-don-t-call-gdk_wayland_window_configure-without-v.patch diff --git a/debian/patches/wayland-don-t-call-gdk_wayland_window_configure-without-v.patch b/debian/patches/wayland-don-t-call-gdk_wayland_window_configure-without-v.patch new file mode 100644 index 0000000000..8b5fc099ae --- /dev/null +++ b/debian/patches/wayland-don-t-call-gdk_wayland_window_configure-without-v.patch @@ -0,0 +1,41 @@ +From: Jonas Witschel +Date: Sun, 5 Apr 2020 20:16:52 +0200 +Subject: wayland: don't call gdk_wayland_window_configure without valid size + +Commit 7f12dc2b66bba15b2e1c0ca077fa4ae58962ec0f ("wayland: Postpone +window resize requests until configured") runs +gdk_wayland_window_configure unconditionally even if no valid size is +set. This breaks GtkDialogs, which are not shown any more, and results +in warnings like + +gtk_widget_size_allocate(): attempt to allocate widget with width -3 and +height -3 + +Bug: https://gitlab.gnome.org/GNOME/gtk/-/issues/2574 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=955820 +Forwarded: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1634 +Applied-upstream: no +--- + gdk/wayland/gdkwindow-wayland.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c +index 0450650..2dfe6f1 100644 +--- a/gdk/wayland/gdkwindow-wayland.c ++++ b/gdk/wayland/gdkwindow-wayland.c +@@ -1639,10 +1639,11 @@ gdk_wayland_window_handle_configure (GdkWindow *window, + } + else + { +- gdk_wayland_window_configure (window, +- impl->unconfigured_width, +- impl->unconfigured_height, +- impl->scale); ++ if (impl->unconfigured_width > 0 && impl->unconfigured_height > 0) ++ gdk_wayland_window_configure (window, ++ impl->unconfigured_width, ++ impl->unconfigured_height, ++ impl->scale); + } + + if (fixed_size)