r54582 - in /desktop/unstable/gtk+3.0/debian: ./ patches/

smcv at users.alioth.debian.org smcv at users.alioth.debian.org
Sat Oct 28 12:57:04 UTC 2017


Author: smcv
Date: Sat Oct 28 12:57:03 2017
New Revision: 54582

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=54582
Log:
d/p/0004-wayland-Do-not-constrain-saved-window-size.patch,
d/p/0005-Set-GDK_WINDOW_STATE_TILED-if-any-edge-is-tiled.patch,
d/p/0006-GtkHeaderBar-Reconsider-buttons-if-any-tiling-state-.patch,
d/p/0007-GtkWindow-Set-tiled-class-on-windows-that-have-any-t.patch:
Add patches committed upstream to fix tiling behaviour with GNOME
3.26 (Closes: #879566)

Added:
    desktop/unstable/gtk+3.0/debian/patches/0004-wayland-Do-not-constrain-saved-window-size.patch
    desktop/unstable/gtk+3.0/debian/patches/0005-Set-GDK_WINDOW_STATE_TILED-if-any-edge-is-tiled.patch
    desktop/unstable/gtk+3.0/debian/patches/0006-GtkHeaderBar-Reconsider-buttons-if-any-tiling-state-.patch
    desktop/unstable/gtk+3.0/debian/patches/0007-GtkWindow-Set-tiled-class-on-windows-that-have-any-t.patch
Modified:
    desktop/unstable/gtk+3.0/debian/changelog
    desktop/unstable/gtk+3.0/debian/patches/series

Modified: desktop/unstable/gtk+3.0/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gtk%2B3.0/debian/changelog?rev=54582&op=diff
==============================================================================
--- desktop/unstable/gtk+3.0/debian/changelog	[utf-8] (original)
+++ desktop/unstable/gtk+3.0/debian/changelog	[utf-8] Sat Oct 28 12:57:03 2017
@@ -1,3 +1,14 @@
+gtk+3.0 (3.22.24-4) UNRELEASED; urgency=medium
+
+  * d/p/0004-wayland-Do-not-constrain-saved-window-size.patch,
+    d/p/0005-Set-GDK_WINDOW_STATE_TILED-if-any-edge-is-tiled.patch,
+    d/p/0006-GtkHeaderBar-Reconsider-buttons-if-any-tiling-state-.patch,
+    d/p/0007-GtkWindow-Set-tiled-class-on-windows-that-have-any-t.patch:
+    Add patches committed upstream to fix tiling behaviour with GNOME
+    3.26 (Closes: #879566)
+
+ -- Simon McVittie <smcv at debian.org>  Sat, 28 Oct 2017 00:53:44 +0100
+
 gtk+3.0 (3.22.24-3) unstable; urgency=medium
 
   [ Jeremy Bicha ]

Added: desktop/unstable/gtk+3.0/debian/patches/0004-wayland-Do-not-constrain-saved-window-size.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gtk%2B3.0/debian/patches/0004-wayland-Do-not-constrain-saved-window-size.patch?rev=54582&op=file
==============================================================================
--- desktop/unstable/gtk+3.0/debian/patches/0004-wayland-Do-not-constrain-saved-window-size.patch	(added)
+++ desktop/unstable/gtk+3.0/debian/patches/0004-wayland-Do-not-constrain-saved-window-size.patch	[utf-8] Sat Oct 28 12:57:03 2017
@@ -0,0 +1,86 @@
+From 30e72154066842dc68d02a030aeeb562d8d9ee4f Mon Sep 17 00:00:00 2001
+From: Olivier Fourdan <ofourdan at redhat.com>
+Date: Wed, 21 Jun 2017 15:02:05 +0200
+Subject: [PATCH] wayland: Do not constrain saved window size
+
+Under Wayland, an xdg_surface.configure with size 0x0 means it's up to
+the client to set its size.
+
+When transitioning from maximized state to un-maximized, the Wayland
+compositor will send such an 0x0 configure so that the client can
+restore its original size.
+
+However, the original size was already constrained, so re-applying
+size constrains can lead to a smaller size when using size increments.
+
+Avoid this caveat by not applying size constrains when we are restoring
+the original size.
+
+Bug: https://bugzilla.gnome.org/show_bug.cgi?id=777072
+Origin: upstream, 3.22.25, commit:30e72154066842dc68d02a030aeeb562d8d9ee4f
+---
+ gdk/wayland/gdkwindow-wayland.c | 27 ++++++++++++++++-----------
+ 1 file changed, 16 insertions(+), 11 deletions(-)
+
+diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
+index c87d6d9ce7..66c19e0425 100644
+--- a/gdk/wayland/gdkwindow-wayland.c
++++ b/gdk/wayland/gdkwindow-wayland.c
+@@ -1373,6 +1373,7 @@ xdg_surface_configure (void                   *data,
+   int width = impl->pending.width;
+   int height = impl->pending.height;
+   gboolean fixed_size;
++  gboolean saved_size;
+ 
+   if (!impl->initial_configure_received)
+     {
+@@ -1392,6 +1393,7 @@ xdg_surface_configure (void                   *data,
+   fixed_size =
+     new_state & (GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_FULLSCREEN | GDK_WINDOW_STATE_TILED);
+ 
++  saved_size = (width == 0 && height == 0);
+   /* According to xdg_shell, an xdg_surface.configure with size 0x0
+    * should be interpreted as that it is up to the client to set a
+    * size.
+@@ -1400,7 +1402,7 @@ xdg_surface_configure (void                   *data,
+    * the client should configure its size back to what it was before
+    * being maximize or fullscreen.
+    */
+-  if (width == 0 && height == 0 && !fixed_size)
++  if (saved_size && !fixed_size)
+     {
+       width = impl->saved_width;
+       height = impl->saved_height;
+@@ -1413,16 +1415,19 @@ xdg_surface_configure (void                   *data,
+       /* Ignore size increments for maximized/fullscreen windows */
+       if (fixed_size)
+         geometry_mask &= ~GDK_HINT_RESIZE_INC;
+-
+-      gdk_window_constrain_size (&impl->geometry_hints,
+-                                 geometry_mask,
+-                                 width + impl->margin_left + impl->margin_right,
+-                                 height + impl->margin_top + impl->margin_bottom,
+-                                 &width,
+-                                 &height);
+-
+-      /* Save size for next time we get 0x0 */
+-      _gdk_wayland_window_save_size (window);
++      if (!saved_size)
++        {
++          /* Do not reapply contrains if we are restoring original size */
++          gdk_window_constrain_size (&impl->geometry_hints,
++                                     geometry_mask,
++                                     width + impl->margin_left + impl->margin_right,
++                                     height + impl->margin_top + impl->margin_bottom,
++                                     &width,
++                                     &height);
++
++          /* Save size for next time we get 0x0 */
++          _gdk_wayland_window_save_size (window);
++        }
+ 
+       gdk_wayland_window_configure (window, width, height, impl->scale);
+     }
+-- 
+2.15.0.rc2
+

Added: desktop/unstable/gtk+3.0/debian/patches/0005-Set-GDK_WINDOW_STATE_TILED-if-any-edge-is-tiled.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gtk%2B3.0/debian/patches/0005-Set-GDK_WINDOW_STATE_TILED-if-any-edge-is-tiled.patch?rev=54582&op=file
==============================================================================
--- desktop/unstable/gtk+3.0/debian/patches/0005-Set-GDK_WINDOW_STATE_TILED-if-any-edge-is-tiled.patch	(added)
+++ desktop/unstable/gtk+3.0/debian/patches/0005-Set-GDK_WINDOW_STATE_TILED-if-any-edge-is-tiled.patch	[utf-8] Sat Oct 28 12:57:03 2017
@@ -0,0 +1,90 @@
+From b1178b7234df720f5f80beccc2d98d93df45041b Mon Sep 17 00:00:00 2001
+From: Simon McVittie <smcv at debian.org>
+Date: Thu, 26 Oct 2017 15:51:51 +0100
+Subject: [PATCH 1/3] Set GDK_WINDOW_STATE_TILED if any edge is tiled
+
+This state flag is used in several places in GTK+, for example to
+ignore RESIZE_INC hints if tiled. Setting it is also necessary for
+backwards compatibility with applications that changed their behaviour
+when tiled, such as GNOME Terminal and its MATE fork.
+
+Signed-off-by: Simon McVittie <smcv at debian.org>
+Applied-upstream: 3.22.25, commit:465ef5055422531b53934ab6fb5496d3b9b7c540
+---
+ gdk/wayland/gdkwindow-wayland.c |  8 ++++----
+ gdk/x11/gdkdisplay-x11.c        | 20 +++++++++++++++++---
+ 2 files changed, 21 insertions(+), 7 deletions(-)
+
+diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
+index c87d6d9ce7..6eef6ec9a1 100644
+--- a/gdk/wayland/gdkwindow-wayland.c
++++ b/gdk/wayland/gdkwindow-wayland.c
+@@ -2964,16 +2964,16 @@ gtk_surface_configure (void                *data,
+ 
+         /* Since v2 */
+         case GTK_SURFACE1_STATE_TILED_TOP:
+-          new_state |= GDK_WINDOW_STATE_TOP_TILED;
++          new_state |= (GDK_WINDOW_STATE_TILED | GDK_WINDOW_STATE_TOP_TILED);
+           break;
+         case GTK_SURFACE1_STATE_TILED_RIGHT:
+-          new_state |= GDK_WINDOW_STATE_RIGHT_TILED;
++          new_state |= (GDK_WINDOW_STATE_TILED | GDK_WINDOW_STATE_RIGHT_TILED);
+           break;
+         case GTK_SURFACE1_STATE_TILED_BOTTOM:
+-          new_state |= GDK_WINDOW_STATE_BOTTOM_TILED;
++          new_state |= (GDK_WINDOW_STATE_TILED | GDK_WINDOW_STATE_BOTTOM_TILED);
+           break;
+         case GTK_SURFACE1_STATE_TILED_LEFT:
+-          new_state |= GDK_WINDOW_STATE_LEFT_TILED;
++          new_state |= (GDK_WINDOW_STATE_TILED | GDK_WINDOW_STATE_LEFT_TILED);
+           break;
+         default:
+           /* Unknown state */
+diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
+index 964edbccae..3e843d65cb 100644
+--- a/gdk/x11/gdkdisplay-x11.c
++++ b/gdk/x11/gdkdisplay-x11.c
+@@ -189,6 +189,11 @@ gdk_x11_display_event_translator_init (GdkEventTranslatorIface *iface)
+   iface->translate_event = gdk_x11_display_translate_event;
+ }
+ 
++#define ANY_EDGE_TILED (GDK_WINDOW_STATE_LEFT_TILED | \
++                        GDK_WINDOW_STATE_RIGHT_TILED | \
++                        GDK_WINDOW_STATE_TOP_TILED | \
++                        GDK_WINDOW_STATE_BOTTOM_TILED)
++
+ static void
+ do_edge_constraint_state_check (GdkWindow      *window,
+                                 GdkWindowState  old_state,
+@@ -205,8 +210,9 @@ do_edge_constraint_state_check (GdkWindow      *window,
+   edge_constraints = toplevel->edge_constraints;
+ 
+   /* If the WM doesn't support _GTK_EDGE_CONSTRAINTS, rely on the fallback
+-   * implementation. If it supports _GTK_EDGE_CONSTRAINTS, however, remove
+-   * the GDK_WINDOW_STATE_TILED flag explicitly.
++   * implementation. If it supports _GTK_EDGE_CONSTRAINTS, arrange for
++   * GDK_WINDOW_STATE_TILED to be set if any edge is tiled, and cleared
++   * if no edge is tiled.
+    */
+   if (!gdk_x11_screen_supports_net_wm_hint (screen,
+                                             gdk_atom_intern_static_string ("_GTK_EDGE_CONSTRAINTS")))
+@@ -229,7 +235,15 @@ do_edge_constraint_state_check (GdkWindow      *window,
+   else
+     {
+       if (old_state & GDK_WINDOW_STATE_TILED)
+-        local_unset |= GDK_WINDOW_STATE_TILED;
++        {
++          if (!(edge_constraints & ANY_EDGE_TILED))
++            local_unset |= GDK_WINDOW_STATE_TILED;
++        }
++      else
++        {
++          if (edge_constraints & ANY_EDGE_TILED)
++            local_set |= GDK_WINDOW_STATE_TILED;
++        }
+     }
+ 
+   /* Top edge */
+-- 
+2.15.0.rc2
+

Added: desktop/unstable/gtk+3.0/debian/patches/0006-GtkHeaderBar-Reconsider-buttons-if-any-tiling-state-.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gtk%2B3.0/debian/patches/0006-GtkHeaderBar-Reconsider-buttons-if-any-tiling-state-.patch?rev=54582&op=file
==============================================================================
--- desktop/unstable/gtk+3.0/debian/patches/0006-GtkHeaderBar-Reconsider-buttons-if-any-tiling-state-.patch	(added)
+++ desktop/unstable/gtk+3.0/debian/patches/0006-GtkHeaderBar-Reconsider-buttons-if-any-tiling-state-.patch	[utf-8] Sat Oct 28 12:57:03 2017
@@ -0,0 +1,37 @@
+From dbf030638e380d2a9ef73cc5e929bcb2ce39310c Mon Sep 17 00:00:00 2001
+From: Simon McVittie <smcv at debian.org>
+Date: Thu, 26 Oct 2017 15:57:29 +0100
+Subject: [PATCH 2/3] GtkHeaderBar: Reconsider buttons if any tiling state
+ changes
+
+Looking at the 1-bit "tiled or not?" state is not necessarily
+enough.
+
+Signed-off-by: Simon McVittie <smcv at debian.org>
+Applied-upstream: 3.22.25, commit:8ad40a49ee28928effcbc57cff463e2867564427
+---
+ gtk/gtkheaderbar.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/gtk/gtkheaderbar.c b/gtk/gtkheaderbar.c
+index 6211f0ec3c..ae85993464 100644
+--- a/gtk/gtkheaderbar.c
++++ b/gtk/gtkheaderbar.c
+@@ -1931,7 +1931,13 @@ window_state_changed (GtkWidget           *window,
+ {
+   GtkHeaderBar *bar = GTK_HEADER_BAR (data);
+ 
+-  if (event->changed_mask & (GDK_WINDOW_STATE_FULLSCREEN | GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_TILED))
++  if (event->changed_mask & (GDK_WINDOW_STATE_FULLSCREEN |
++                             GDK_WINDOW_STATE_MAXIMIZED |
++                             GDK_WINDOW_STATE_TILED |
++                             GDK_WINDOW_STATE_TOP_TILED |
++                             GDK_WINDOW_STATE_RIGHT_TILED |
++                             GDK_WINDOW_STATE_BOTTOM_TILED |
++                             GDK_WINDOW_STATE_LEFT_TILED))
+     _gtk_header_bar_update_window_buttons (bar);
+ 
+   return FALSE;
+-- 
+2.15.0.rc2
+

Added: desktop/unstable/gtk+3.0/debian/patches/0007-GtkWindow-Set-tiled-class-on-windows-that-have-any-t.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gtk%2B3.0/debian/patches/0007-GtkWindow-Set-tiled-class-on-windows-that-have-any-t.patch?rev=54582&op=file
==============================================================================
--- desktop/unstable/gtk+3.0/debian/patches/0007-GtkWindow-Set-tiled-class-on-windows-that-have-any-t.patch	(added)
+++ desktop/unstable/gtk+3.0/debian/patches/0007-GtkWindow-Set-tiled-class-on-windows-that-have-any-t.patch	[utf-8] Sat Oct 28 12:57:03 2017
@@ -0,0 +1,42 @@
+From e8a284c499e15e3b2b8ff21117b5fa832d0a044b Mon Sep 17 00:00:00 2001
+From: Simon McVittie <smcv at debian.org>
+Date: Thu, 26 Oct 2017 16:02:07 +0100
+Subject: [PATCH 3/3] GtkWindow: Set tiled class on windows that have any tiled
+ edge
+
+This has no practical effect on Adwaita, but might fix some
+third-party themes that were broken by GTK+ 3.22.23.
+
+Signed-off-by: Simon McVittie <smcv at debian.org>
+Applied-upstream: 3.22.25, commit:72045a1a2defa82692bac043c5123da7944d76ec
+---
+ gtk/gtkwindow.c | 12 +++++-------
+ 1 file changed, 5 insertions(+), 7 deletions(-)
+
+diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
+index a4ba098224..eb3b33578a 100644
+--- a/gtk/gtkwindow.c
++++ b/gtk/gtkwindow.c
+@@ -7636,14 +7636,12 @@ update_window_style_classes (GtkWindow *window)
+ 
+   context = gtk_widget_get_style_context (GTK_WIDGET (window));
+ 
+-  if (priv->edge_constraints == 0)
+-    {
+-      if (priv->tiled)
+-        gtk_style_context_add_class (context, "tiled");
+-      else
+-        gtk_style_context_remove_class (context, "tiled");
+-    }
++  if (priv->tiled)
++    gtk_style_context_add_class (context, "tiled");
+   else
++    gtk_style_context_remove_class (context, "tiled");
++
++  if (priv->edge_constraints != 0)
+     {
+       guint edge_constraints = priv->edge_constraints;
+ 
+-- 
+2.15.0.rc2
+

Modified: desktop/unstable/gtk+3.0/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gtk%2B3.0/debian/patches/series?rev=54582&op=diff
==============================================================================
--- desktop/unstable/gtk+3.0/debian/patches/series	[utf-8] (original)
+++ desktop/unstable/gtk+3.0/debian/patches/series	[utf-8] Sat Oct 28 12:57:03 2017
@@ -9,3 +9,7 @@
 0001-Adwaita-Fix-typo-.backgrounf-.background.patch
 0002-theme-Fix-Adwaita-headerbars.patch
 0003-display-x11-Unset-tiled-state-if-_GTK_EDGE_CONSTRAIN.patch
+0004-wayland-Do-not-constrain-saved-window-size.patch
+0005-Set-GDK_WINDOW_STATE_TILED-if-any-edge-is-tiled.patch
+0006-GtkHeaderBar-Reconsider-buttons-if-any-tiling-state-.patch
+0007-GtkWindow-Set-tiled-class-on-windows-that-have-any-t.patch




More information about the pkg-gnome-commits mailing list