r51183 - in /desktop/unstable/gtk+3.0/debian: changelog patches/series patches/wayland-Avoid-negative-size-constraints.patch patches/wayland-always-sync-state-after-a-frame-is-painted.patch

sjoerd at users.alioth.debian.org sjoerd at users.alioth.debian.org
Wed Sep 28 12:17:41 UTC 2016


Author: sjoerd
Date: Wed Sep 28 12:17:40 2016
New Revision: 51183

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=51183
Log:
* d/p/wayland-Avoid-negative-size-constraints.patch
  - Added. Resolve unexpected order of size-allocation signals, fixes issues
    with placing clutter-gtk widgets on wayland.
    (From upstream git, bgo#771915)
* d/p/wayland-always-sync-state-after-a-frame-is-painted.patch
  - Added. Always sync the state after a frame paint. Avoids things getting
    out of sync when painting using GL as e.g. epiphany does these days.
    (From upstream git, bgo#771553)

Added:
    desktop/unstable/gtk+3.0/debian/patches/wayland-Avoid-negative-size-constraints.patch
    desktop/unstable/gtk+3.0/debian/patches/wayland-always-sync-state-after-a-frame-is-painted.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=51183&op=diff
==============================================================================
--- desktop/unstable/gtk+3.0/debian/changelog	[utf-8] (original)
+++ desktop/unstable/gtk+3.0/debian/changelog	[utf-8] Wed Sep 28 12:17:40 2016
@@ -1,3 +1,16 @@
+gtk+3.0 (3.22.0-2) UNRELEASED; urgency=medium
+
+  * d/p/wayland-Avoid-negative-size-constraints.patch
+    - Added. Resolve unexpected order of size-allocation signals, fixes issues
+      with placing clutter-gtk widgets on wayland.
+      (From upstream git, bgo#771915)
+  * d/p/wayland-always-sync-state-after-a-frame-is-painted.patch
+    - Added. Always sync the state after a frame paint. Avoids things getting
+      out of sync when painting using GL as e.g. epiphany does these days.
+      (From upstream git, bgo#771553)
+
+ -- Sjoerd Simons <sjoerd at debian.org>  Wed, 28 Sep 2016 10:31:40 +0200
+
 gtk+3.0 (3.22.0-1) unstable; urgency=medium
 
   * New upstream release.

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=51183&op=diff
==============================================================================
--- desktop/unstable/gtk+3.0/debian/patches/series	[utf-8] (original)
+++ desktop/unstable/gtk+3.0/debian/patches/series	[utf-8] Wed Sep 28 12:17:40 2016
@@ -8,3 +8,6 @@
 no-accessibility-dump.patch
 reftest-known-fail.patch
 0001-Fix-division-by-zero-when-calculating-the-refresh-ra.patch
+
+wayland-always-sync-state-after-a-frame-is-painted.patch
+wayland-Avoid-negative-size-constraints.patch

Added: desktop/unstable/gtk+3.0/debian/patches/wayland-Avoid-negative-size-constraints.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gtk%2B3.0/debian/patches/wayland-Avoid-negative-size-constraints.patch?rev=51183&op=file
==============================================================================
--- desktop/unstable/gtk+3.0/debian/patches/wayland-Avoid-negative-size-constraints.patch	(added)
+++ desktop/unstable/gtk+3.0/debian/patches/wayland-Avoid-negative-size-constraints.patch	[utf-8] Wed Sep 28 12:17:40 2016
@@ -0,0 +1,93 @@
+From dbd0923b5f7b4a7cdea182c8d20085c013c4571c Mon Sep 17 00:00:00 2001
+From: Olivier Fourdan <ofourdan at redhat.com>
+Date: Tue, 27 Sep 2016 16:48:57 +0200
+Subject: [PATCH] wayland: Avoid negative size constraints
+
+Setting the shadow width earlier as done with commit 4cb1b96 to address
+bug 771561 proved to cause unexpected side effects on size_allocate
+signal propagation.
+
+As the window is sized correctly earlier, the size_allocate signal is
+not emitted again in gtk_widget_size_allocate_with_baseline() which
+prevents clutter-gtk from relocating its child widget correctly.
+
+To avoid this issue, revert commit 4cb1b96 but make sure the values
+passed as min and max size is never negative in Wayland as this is a
+protocol error.
+
+With this, the min/max size will be wrong for a short amount of time,
+during the state transition, until the shadow width is updated from
+gdk_window_set_shadow_width().
+
+This approach is much safer and less intrusive than changing the
+size_allocate logic in gtk.
+
+This reverts commit 4cb1b9645e84054c059f174240e8e288c4befe05.
+
+Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=771915
+---
+ gdk/wayland/gdkwindow-wayland.c |  8 ++++----
+ gtk/gtkwindow.c                 | 14 --------------
+ 2 files changed, 4 insertions(+), 18 deletions(-)
+
+diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
+index fa8dbe0..f35c4c8 100644
+--- a/gdk/wayland/gdkwindow-wayland.c
++++ b/gdk/wayland/gdkwindow-wayland.c
+@@ -2992,8 +2992,8 @@ gdk_wayland_window_set_geometry_hints (GdkWindow         *window,
+ 
+   if (geom_mask & GDK_HINT_MIN_SIZE)
+     {
+-      width = geometry->min_width - (impl->margin_left + impl->margin_right);
+-      height = geometry->min_height - (impl->margin_top + impl->margin_bottom);
++      width = MAX (0, geometry->min_width - (impl->margin_left + impl->margin_right));
++      height = MAX (0, geometry->min_height - (impl->margin_top + impl->margin_bottom));
+     }
+   else
+     {
+@@ -3005,8 +3005,8 @@ gdk_wayland_window_set_geometry_hints (GdkWindow         *window,
+ 
+   if (geom_mask & GDK_HINT_MAX_SIZE)
+     {
+-      width = geometry->max_width - (impl->margin_left + impl->margin_right);
+-      height = geometry->max_height - (impl->margin_top + impl->margin_bottom);
++      width = MAX (0, geometry->max_width - (impl->margin_left + impl->margin_right));
++      height = MAX (0, geometry->max_height - (impl->margin_top + impl->margin_bottom));
+     }
+   else
+     {
+diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
+index 14a11c3..1a4b14b 100644
+--- a/gtk/gtkwindow.c
++++ b/gtk/gtkwindow.c
+@@ -7529,19 +7529,6 @@ update_window_style_classes (GtkWindow *window)
+ }
+ 
+ static void
+-update_window_borders (GtkWindow *window)
+-{
+-  GtkWindowPrivate *priv = window->priv;
+-  GtkBorder window_border = { 0 };
+-
+-  if (priv->client_decorated && priv->use_client_shadow)
+-    {
+-      get_shadow_width (window, &window_border);
+-      update_shadow_width (window, &window_border);
+-    }
+-}
+-
+-static void
+ popover_size_allocate (GtkWidget        *widget,
+                        GtkWindowPopover *popover,
+                        GtkWindow        *window)
+@@ -7811,7 +7798,6 @@ gtk_window_state_event (GtkWidget           *widget,
+     {
+       update_window_style_classes (window);
+       update_window_buttons (window);
+-      update_window_borders (window);
+       gtk_widget_queue_resize (widget);
+     }
+ 
+-- 
+2.9.3
+

Added: desktop/unstable/gtk+3.0/debian/patches/wayland-always-sync-state-after-a-frame-is-painted.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gtk%2B3.0/debian/patches/wayland-always-sync-state-after-a-frame-is-painted.patch?rev=51183&op=file
==============================================================================
--- desktop/unstable/gtk+3.0/debian/patches/wayland-always-sync-state-after-a-frame-is-painted.patch	(added)
+++ desktop/unstable/gtk+3.0/debian/patches/wayland-always-sync-state-after-a-frame-is-painted.patch	[utf-8] Wed Sep 28 12:17:40 2016
@@ -0,0 +1,43 @@
+From 7292b035593008e79cf4aae1b8dcf0f7a83bc55f Mon Sep 17 00:00:00 2001
+From: Gustavo Noronha Silva <gustavo.noronha at collabora.co.uk>
+Date: Mon, 26 Sep 2016 10:56:42 +0200
+Subject: [PATCH] wayland: always sync state after a frame is painted
+
+Opaque region, margin and input region were only being synced when a cairo
+paint happened. That caused GL paints to sometimes end up with bad state.
+Move calls to sync state to gdk_window_impl_wayland_end_paint.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=771553
+---
+ gdk/wayland/gdkwindow-wayland.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
+index f35c4c8..7dbb979 100644
+--- a/gdk/wayland/gdkwindow-wayland.c
++++ b/gdk/wayland/gdkwindow-wayland.c
+@@ -597,10 +597,6 @@ on_frame_clock_after_paint (GdkFrameClock *clock,
+   if (impl->pending_buffer_attached)
+     read_back_cairo_surface (window);
+ 
+-  gdk_wayland_window_sync_margin (window);
+-  gdk_wayland_window_sync_opaque_region (window);
+-  gdk_wayland_window_sync_input_region (window);
+-
+   /* From this commit forward, we can't write to the buffer,
+    * it's "live".  In the future, if we need to stage more changes
+    * we have to allocate a new staging buffer and draw to it instead.
+@@ -936,6 +932,10 @@ gdk_window_impl_wayland_end_paint (GdkWindow *window)
+ 
+       impl->pending_commit = TRUE;
+     }
++
++  gdk_wayland_window_sync_margin (window);
++  gdk_wayland_window_sync_opaque_region (window);
++  gdk_wayland_window_sync_input_region (window);
+ }
+ 
+ static gboolean
+-- 
+2.9.3
+




More information about the pkg-gnome-commits mailing list