Accepting request 432227 from GNOME:Next

1

OBS-URL: https://build.opensuse.org/request/show/432227
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gtk3?expand=0&rev=252
This commit is contained in:
Bjørn Lie 2016-10-05 08:52:20 +00:00 committed by Git OBS Bridge
parent ebfab7320a
commit f6c725cefd
8 changed files with 19 additions and 637 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:88d0bb584be7ecec965b82ba88a9cf0aafd6f03eff7447653295ab2341c74134
size 20787268

3
gtk+-3.22.1.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:127c8c5cfc32681f9ab3cb542eb0d5c16c1c02faba68bf8fcac9a3cf278ef471
size 20779708

View File

@ -1,472 +0,0 @@
From a3f1596069ae966ffa785e85327a868e041560c4 Mon Sep 17 00:00:00 2001
From: Rico Tzschichholz <ricotz@ubuntu.com>
Date: Thu, 22 Sep 2016 13:56:47 +0200
Subject: Add some missing (nullable) annotations
https://bugzilla.gnome.org/show_bug.cgi?id=771826
---
gdk/gdkdisplay.c | 6 +++---
gdk/gdkdnd.c | 2 +-
gdk/gdkglcontext.c | 8 ++++----
gdk/gdkkeys.c | 4 ++--
gtk/deprecated/gtknumerableicon.c | 8 ++++----
gtk/deprecated/gtkstatusicon.c | 12 ++++++------
gtk/deprecated/gtkstyle.c | 2 +-
gtk/deprecated/gtkthemingengine.c | 4 ++--
gtk/gtkactionable.c | 2 +-
gtk/gtkcellrenderer.c | 6 +++---
gtk/gtkcsscustomproperty.c | 2 +-
gtk/gtkdragdest.c | 2 +-
gtk/gtkicontheme.c | 2 +-
gtk/gtkrecentmanager.c | 8 ++++----
gtk/gtkstylecontext.c | 4 ++--
gtk/gtkstyleproperty.c | 2 +-
gtk/gtkstyleprovider.c | 4 ++--
gtk/gtkwidgetpath.c | 4 ++--
gtk/gtkwindow.c | 2 +-
19 files changed, 42 insertions(+), 42 deletions(-)
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
index f771564..ed0e65f 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
@@ -1792,7 +1792,7 @@ gdk_display_supports_clipboard_persistence (GdkDisplay *display)
* @display: a #GdkDisplay
* @clipboard_window: a #GdkWindow belonging to the clipboard owner
* @time_: a timestamp
- * @targets: (array length=n_targets): an array of targets
+ * @targets: (array length=n_targets) (nullable): an array of targets
* that should be saved, or %NULL
* if all available targets should be saved.
* @n_targets: length of the @targets array
@@ -2570,7 +2570,7 @@ get_fallback_monitor (GdkDisplay *display)
*
* Gets a monitor associated with this display.
*
- * Returns: (transfer none): the #GdkMonitor, or %NULL if
+ * Returns: (nullable) (transfer none): the #GdkMonitor, or %NULL if
* @monitor_num is not a valid monitor number
* Since: 3.22
*/
@@ -2597,7 +2597,7 @@ gdk_display_get_monitor (GdkDisplay *display,
* manager to place the windows, specialized desktop applications
* such as panels should place themselves on the primary monitor.
*
- * Returns: (transfer none): the primary monitor, or %NULL if no primary
+ * Returns: (nullable) (transfer none): the primary monitor, or %NULL if no primary
* monitor is configured by the user
* Since: 3.22
*/
diff --git a/gdk/gdkdnd.c b/gdk/gdkdnd.c
index 163a705..d0629cf 100644
--- a/gdk/gdkdnd.c
+++ b/gdk/gdkdnd.c
@@ -592,7 +592,7 @@ gdk_drag_get_selection (GdkDragContext *context)
* The window is owned by @context and will be destroyed when
* the drag operation is over.
*
- * Returns: (transfer none): the drag window, or %NULL
+ * Returns: (nullable) (transfer none): the drag window, or %NULL
*
* Since: 3.20
*/
diff --git a/gdk/gdkglcontext.c b/gdk/gdkglcontext.c
index 40addbc..bf6e45f 100644
--- a/gdk/gdkglcontext.c
+++ b/gdk/gdkglcontext.c
@@ -873,7 +873,7 @@ gdk_gl_context_make_current (GdkGLContext *context)
*
* Retrieves the #GdkDisplay the @context is created for
*
- * Returns: (transfer none): a #GdkDisplay or %NULL
+ * Returns: (nullable) (transfer none): a #GdkDisplay or %NULL
*
* Since: 3.16
*/
@@ -893,7 +893,7 @@ gdk_gl_context_get_display (GdkGLContext *context)
*
* Retrieves the #GdkWindow used by the @context.
*
- * Returns: (transfer none): a #GdkWindow or %NULL
+ * Returns: (nullable) (transfer none): a #GdkWindow or %NULL
*
* Since: 3.16
*/
@@ -913,7 +913,7 @@ gdk_gl_context_get_window (GdkGLContext *context)
*
* Retrieves the #GdkGLContext that this @context share data with.
*
- * Returns: (transfer none): a #GdkGLContext or %NULL
+ * Returns: (nullable) (transfer none): a #GdkGLContext or %NULL
*
* Since: 3.16
*/
@@ -985,7 +985,7 @@ gdk_gl_context_clear_current (void)
*
* Retrieves the current #GdkGLContext.
*
- * Returns: (transfer none): the current #GdkGLContext, or %NULL
+ * Returns: (nullable) (transfer none): the current #GdkGLContext, or %NULL
*
* Since: 3.16
*/
diff --git a/gdk/gdkkeys.c b/gdk/gdkkeys.c
index d7f76a9..467e063 100644
--- a/gdk/gdkkeys.c
+++ b/gdk/gdkkeys.c
@@ -437,9 +437,9 @@ gdk_keymap_get_entries_for_keyval (GdkKeymap *keymap,
* gdk_keymap_get_entries_for_keycode:
* @keymap: a #GdkKeymap
* @hardware_keycode: a keycode
- * @keys: (out) (array length=n_entries) (transfer full): return
+ * @keys: (out) (array length=n_entries) (transfer full) (optional): return
* location for array of #GdkKeymapKey, or %NULL
- * @keyvals: (out) (array length=n_entries) (transfer full): return
+ * @keyvals: (out) (array length=n_entries) (transfer full) (optional): return
* location for array of keyvals, or %NULL
* @n_entries: length of @keys and @keyvals
*
diff --git a/gtk/deprecated/gtknumerableicon.c b/gtk/deprecated/gtknumerableicon.c
index 7f63f4d..7527c5e 100644
--- a/gtk/deprecated/gtknumerableicon.c
+++ b/gtk/deprecated/gtknumerableicon.c
@@ -713,7 +713,7 @@ _gtk_numerable_icon_set_background_icon_size (GtkNumerableIcon *self,
*
* Returns the currently displayed label of the icon, or %NULL.
*
- * Returns: the currently displayed label
+ * Returns: (nullable): the currently displayed label
*
* Since: 3.0
*
@@ -825,7 +825,7 @@ gtk_numerable_icon_set_count (GtkNumerableIcon *self,
* Returns the #GtkStyleContext used by the icon for theming,
* or %NULL if theres none.
*
- * Returns: (transfer none): a #GtkStyleContext, or %NULL.
+ * Returns: (nullable) (transfer none): a #GtkStyleContext, or %NULL.
* This object is internal to GTK+ and should not be unreffed.
* Use g_object_ref() if you want to keep it around
*
@@ -919,7 +919,7 @@ gtk_numerable_icon_set_background_gicon (GtkNumerableIcon *self,
* %NULL if theres none. The caller of this function does not own
* a reference to the returned #GIcon.
*
- * Returns: (transfer none): a #GIcon, or %NULL
+ * Returns: (nullable) (transfer none): a #GIcon, or %NULL
*
* Since: 3.0
*
@@ -992,7 +992,7 @@ gtk_numerable_icon_set_background_icon_name (GtkNumerableIcon *self,
* Returns the icon name used as the base background image,
* or %NULL if theres none.
*
- * Returns: an icon name, or %NULL
+ * Returns: (nullable): an icon name, or %NULL
*
* Since: 3.0
*
diff --git a/gtk/deprecated/gtkstatusicon.c b/gtk/deprecated/gtkstatusicon.c
index 7df11cd..b33a296 100644
--- a/gtk/deprecated/gtkstatusicon.c
+++ b/gtk/deprecated/gtkstatusicon.c
@@ -1919,7 +1919,7 @@ gtk_status_icon_get_storage_type (GtkStatusIcon *status_icon)
* The caller of this function does not own a reference to the
* returned pixbuf.
*
- * Returns: (transfer none): the displayed pixbuf,
+ * Returns: (nullable) (transfer none): the displayed pixbuf,
* or %NULL if the image is empty.
*
* Since: 2.10
@@ -1948,7 +1948,7 @@ gtk_status_icon_get_pixbuf (GtkStatusIcon *status_icon)
* The returned string is owned by the #GtkStatusIcon and should not
* be freed or modified.
*
- * Returns: stock id of the displayed stock icon,
+ * Returns: (nullable): stock id of the displayed stock icon,
* or %NULL if the image is empty.
*
* Since: 2.10
@@ -1977,7 +1977,7 @@ gtk_status_icon_get_stock (GtkStatusIcon *status_icon)
* The returned string is owned by the #GtkStatusIcon and should not
* be freed or modified.
*
- * Returns: name of the displayed icon, or %NULL if the image is empty.
+ * Returns: (nullable): name of the displayed icon, or %NULL if the image is empty.
*
* Since: 2.10
*
@@ -2007,7 +2007,7 @@ gtk_status_icon_get_icon_name (GtkStatusIcon *status_icon)
*
* If this function fails, @icon is left unchanged;
*
- * Returns: (transfer none): the displayed icon, or %NULL if the image is empty
+ * Returns: (nullable) (transfer none): the displayed icon, or %NULL if the image is empty
*
* Since: 2.14
*
@@ -2582,7 +2582,7 @@ gtk_status_icon_set_tooltip_text (GtkStatusIcon *status_icon,
*
* Gets the contents of the tooltip for @status_icon.
*
- * Returns: the tooltip text, or %NULL. You should free the
+ * Returns: (nullable): the tooltip text, or %NULL. You should free the
* returned string with g_free() when done.
*
* Since: 2.16
@@ -2672,7 +2672,7 @@ gtk_status_icon_set_tooltip_markup (GtkStatusIcon *status_icon,
*
* Gets the contents of the tooltip for @status_icon.
*
- * Returns: the tooltip text, or %NULL. You should free the
+ * Returns: (nullable): the tooltip text, or %NULL. You should free the
* returned string with g_free() when done.
*
* Since: 2.16
diff --git a/gtk/deprecated/gtkstyle.c b/gtk/deprecated/gtkstyle.c
index 291e5c2..9477578 100644
--- a/gtk/deprecated/gtkstyle.c
+++ b/gtk/deprecated/gtkstyle.c
@@ -4752,7 +4752,7 @@ gtk_widget_class_path (GtkWidget *widget,
* the application and should not be modified. The pixbuf should be
* freed after use with g_object_unref().
*
- * Returns: (transfer full): a new pixbuf, or %NULL if the
+ * Returns: (nullable) (transfer full): a new pixbuf, or %NULL if the
* stock ID wasnt known
*
* Deprecated: 3.0: Use gtk_widget_render_icon_pixbuf() instead.
diff --git a/gtk/deprecated/gtkthemingengine.c b/gtk/deprecated/gtkthemingengine.c
index e26e807..24dbc79 100644
--- a/gtk/deprecated/gtkthemingengine.c
+++ b/gtk/deprecated/gtkthemingengine.c
@@ -951,7 +951,7 @@ gtk_theming_module_init (GtkThemingModule *module)
* Loads and initializes a theming engine module from the
* standard directories.
*
- * Returns: (transfer none): A theming engine, or %NULL if
+ * Returns: (nullable) (transfer none): A theming engine, or %NULL if
* the engine @name doesnt exist.
*
* Deprecated: 3.14
@@ -1004,7 +1004,7 @@ gtk_theming_engine_load (const gchar *name)
*
* Returns the #GdkScreen to which @engine currently rendering to.
*
- * Returns: (transfer none): a #GdkScreen, or %NULL.
+ * Returns: (nullable) (transfer none): a #GdkScreen, or %NULL.
*
* Deprecated: 3.14
**/
diff --git a/gtk/gtkactionable.c b/gtk/gtkactionable.c
index c28fae2..e12936a 100644
--- a/gtk/gtkactionable.c
+++ b/gtk/gtkactionable.c
@@ -102,7 +102,7 @@ gtk_actionable_get_action_name (GtkActionable *actionable)
/**
* gtk_actionable_set_action_name:
* @actionable: a #GtkActionable widget
- * @action_name: an action name, or %NULL
+ * @action_name: (nullable): an action name, or %NULL
*
* Specifies the name of the action with which this widget should be
* associated. If @action_name is %NULL then the widget will be
diff --git a/gtk/gtkcellrenderer.c b/gtk/gtkcellrenderer.c
index 58969d4..163b896 100644
--- a/gtk/gtkcellrenderer.c
+++ b/gtk/gtkcellrenderer.c
@@ -883,7 +883,7 @@ gtk_cell_renderer_activate (GtkCellRenderer *cell,
/**
* gtk_cell_renderer_start_editing:
* @cell: a #GtkCellRenderer
- * @event: a #GdkEvent
+ * @event: (nullable): a #GdkEvent
* @widget: widget that received the event
* @path: widget-dependent string representation of the event location;
* e.g. for #GtkTreeView, a string representation of #GtkTreePath
@@ -1792,8 +1792,8 @@ gtk_cell_renderer_get_aligned_area (GtkCellRenderer *cell,
/**
* gtk_cell_renderer_get_state:
- * @cell: a #GtkCellRenderer, or %NULL
- * @widget: a #GtkWidget, or %NULL
+ * @cell: (nullable): a #GtkCellRenderer, or %NULL
+ * @widget: (nullable): a #GtkWidget, or %NULL
* @cell_state: cell renderer state
*
* Translates the cell renderer state to #GtkStateFlags,
diff --git a/gtk/gtkcsscustomproperty.c b/gtk/gtkcsscustomproperty.c
index f210ad3..59205dd 100644
--- a/gtk/gtkcsscustomproperty.c
+++ b/gtk/gtkcsscustomproperty.c
@@ -209,7 +209,7 @@ gtk_theming_engine_register_property (const gchar *name_space,
/**
* gtk_style_properties_register_property: (skip)
- * @parse_func: parsing function to use, or %NULL
+ * @parse_func: (nullable): parsing function to use, or %NULL
* @pspec: the #GParamSpec for the new property
*
* Registers a property so it can be used in the CSS file format.
diff --git a/gtk/gtkdragdest.c b/gtk/gtkdragdest.c
index 9a679e7..8f4261b 100644
--- a/gtk/gtkdragdest.c
+++ b/gtk/gtkdragdest.c
@@ -250,7 +250,7 @@ gtk_drag_dest_unset (GtkWidget *widget)
* Returns the list of targets this widget can accept from
* drag-and-drop.
*
- * Returns: (transfer none): the #GtkTargetList, or %NULL if none
+ * Returns: (nullable) (transfer none): the #GtkTargetList, or %NULL if none
*/
GtkTargetList *
gtk_drag_dest_get_target_list (GtkWidget *widget)
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
index 8ebf652..63b6f23 100644
--- a/gtk/gtkicontheme.c
+++ b/gtk/gtkicontheme.c
@@ -3662,7 +3662,7 @@ gtk_icon_info_get_filename (GtkIconInfo *icon_info)
* built in icon images, you must pass the %GTK_ICON_LOOKUP_USE_BUILTIN
* to gtk_icon_theme_lookup_icon().
*
- * Returns: (transfer none): the built-in image pixbuf, or %NULL.
+ * Returns: (nullable) (transfer none): the built-in image pixbuf, or %NULL.
* No extra reference is added to the returned pixbuf, so if
* you want to keep it around, you must use g_object_ref().
* The returned image must not be modified.
diff --git a/gtk/gtkrecentmanager.c b/gtk/gtkrecentmanager.c
index 2f01e3d..1157eec 100644
--- a/gtk/gtkrecentmanager.c
+++ b/gtk/gtkrecentmanager.c
@@ -1968,7 +1968,7 @@ get_icon_fallback (const gchar *icon_name,
*
* Retrieves the icon of size @size associated to the resource MIME type.
*
- * Returns: (transfer full): a #GdkPixbuf containing the icon,
+ * Returns: (nullable) (transfer full): a #GdkPixbuf containing the icon,
* or %NULL. Use g_object_unref() when finished using the icon.
*
* Since: 2.10
@@ -2003,7 +2003,7 @@ gtk_recent_info_get_icon (GtkRecentInfo *info,
*
* Retrieves the icon associated to the resource MIME type.
*
- * Returns: (transfer full): a #GIcon containing the icon, or %NULL.
+ * Returns: (nullable) (transfer full): a #GIcon containing the icon, or %NULL.
* Use g_object_unref() when finished using the icon
*
* Since: 2.22
@@ -2266,7 +2266,7 @@ gtk_recent_info_get_short_name (GtkRecentInfo *info)
* is local, it returns a local path; if the resource is not local,
* it returns the UTF-8 encoded content of gtk_recent_info_get_uri().
*
- * Returns: a newly allocated UTF-8 string containing the
+ * Returns: (nullable): a newly allocated UTF-8 string containing the
* resources URI or %NULL. Use g_free() when done using it.
*
* Since: 2.10
@@ -2427,7 +2427,7 @@ gtk_recent_info_has_group (GtkRecentInfo *info,
*
* Creates a #GAppInfo for the specified #GtkRecentInfo
*
- * Returns: (transfer full): the newly created #GAppInfo, or %NULL.
+ * Returns: (nullable) (transfer full): the newly created #GAppInfo, or %NULL.
* In case of error, @error will be set either with a
* %GTK_RECENT_MANAGER_ERROR or a %G_IO_ERROR
*/
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index 03a16aa..aa80b73 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -939,7 +939,7 @@ gtk_style_context_set_id (GtkStyleContext *context,
*
* Returns the CSS ID used when obtaining style information.
*
- * Returns: the ID or %NULL if no ID is set.
+ * Returns: (nullable): the ID or %NULL if no ID is set.
**/
const char *
gtk_style_context_get_id (GtkStyleContext *context)
@@ -1930,7 +1930,7 @@ gtk_style_context_get_style (GtkStyleContext *context,
* the default icon factory, returning an icon set if found, otherwise
* %NULL.
*
- * Returns: (transfer none): The looked up %GtkIconSet, or %NULL
+ * Returns: (nullable) (transfer none): The looked up %GtkIconSet, or %NULL
*
* Deprecated: 3.10: Use gtk_icon_theme_lookup_icon() instead.
**/
diff --git a/gtk/gtkstyleproperty.c b/gtk/gtkstyleproperty.c
index 9639ae4..e79849b 100644
--- a/gtk/gtkstyleproperty.c
+++ b/gtk/gtkstyleproperty.c
@@ -260,7 +260,7 @@ _gtk_style_property_add_alias (const gchar *name,
* Looks up the CSS property with the given @name. If no such
* property exists, %NULL is returned.
*
- * Returns: (transfer none): The property or %NULL if no
+ * Returns: (nullable) (transfer none): The property or %NULL if no
* property with the given name exists.
**/
GtkStyleProperty *
diff --git a/gtk/gtkstyleprovider.c b/gtk/gtkstyleprovider.c
index fab975a..d522b58 100644
--- a/gtk/gtkstyleprovider.c
+++ b/gtk/gtkstyleprovider.c
@@ -62,7 +62,7 @@ gtk_style_provider_iface_init (gpointer g_iface)
* Returns the style settings affecting a widget defined by @path, or %NULL if
* @provider doesnt contemplate styling @path.
*
- * Returns: (transfer full): a #GtkStyleProperties containing the
+ * Returns: (nullable) (transfer full): a #GtkStyleProperties containing the
* style settings affecting @path
*
* Since: 3.0
@@ -132,7 +132,7 @@ gtk_style_provider_get_style_property (GtkStyleProvider *provider,
* Returns the #GtkIconFactory defined to be in use for @path, or %NULL if none
* is defined.
*
- * Returns: (transfer none): The icon factory to use for @path, or %NULL
+ * Returns: (nullable) (transfer none): The icon factory to use for @path, or %NULL
*
* Since: 3.0
*
diff --git a/gtk/gtkwidgetpath.c b/gtk/gtkwidgetpath.c
index 2a5ad19..ae4d057 100644
--- a/gtk/gtkwidgetpath.c
+++ b/gtk/gtkwidgetpath.c
@@ -523,7 +523,7 @@ gtk_widget_path_iter_get_sibling_index (const GtkWidgetPath *path,
* Returns the object name that is at position @pos in the widget
* hierarchy defined in @path.
*
- * Returns: the name or %NULL
+ * Returns: (nullable): the name or %NULL
*
* Since: 3.20
**/
@@ -713,7 +713,7 @@ gtk_widget_path_iter_set_state (GtkWidgetPath *path,
* the position @pos in the widget hierarchy defined by
* @path
*
- * Returns: The widget name, or %NULL if none was set.
+ * Returns: (nullable): The widget name, or %NULL if none was set.
**/
const gchar *
gtk_widget_path_iter_get_name (const GtkWidgetPath *path,
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 9808475..14a11c3 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -12368,7 +12368,7 @@ _gtk_window_get_popover_position (GtkWindow *window,
* Returns the conceptual parent of this popover, the real
* parent will always be @window.
*
- * Returns: The conceptual parent widget, or %NULL.
+ * Returns: (nullable): The conceptual parent widget, or %NULL.
**/
GtkWidget *
_gtk_window_get_popover_parent (GtkWindow *window,
--
cgit v0.12

View File

@ -1,43 +0,0 @@
From a3ba1bbb41b64ad65a96b22ce1b116e68b820d4c Mon Sep 17 00:00:00 2001
From: Gustavo Noronha Silva <gustavo.noronha@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 fa8dbe0..59cdf02 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.7.4

View File

@ -1,93 +0,0 @@
From dd05f968ad1fc436b594c42e37d4dc62682f01e1 Mon Sep 17 00:00:00 2001
From: Olivier Fourdan <ofourdan@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 59cdf02..7dbb979 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

View File

@ -1,13 +0,0 @@
Index: gtk+-3.22.0/gtk/gtkwidget.c
===================================================================
--- gtk+-3.22.0.orig/gtk/gtkwidget.c
+++ gtk+-3.22.0/gtk/gtkwidget.c
@@ -6998,7 +6998,7 @@ gtk_widget_draw_internal (GtkWidget *wid
if (push_group)
cairo_push_group (cr);
-#ifdef G_ENABLE_DEBUG
+#ifdef G_ENABLE_CONSISTENCY_CHECKS
if (_gtk_widget_get_alloc_needed (widget))
g_warning ("%s %p is drawn without a current allocation. This should not happen.", G_OBJECT_TYPE_NAME (widget), widget);
#endif

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Sat Oct 1 09:13:25 UTC 2016 - zaitor@opensuse.org
- Update to version 3.22.1:
+ Reduce runtime warnings.
+ Bugs fixed: bgo#765649, bgo#769500, bgo#769554, bgo#770388,
bgo#771516, bgo#771553, bgo#771666, bgo#771812, bgo#771826,
bgo#771915, bgo#771959, bgo#771963, bgo#772057, bgo#772215.
+ Updated translations.
- Drop patches fixed upstream:
+ gtk3-widget-warn-consistency-check-only.patch.
+ gtk3-add-missing-annotations.patch.
+ gtk3-wayland-always-sync-state.patch.
+ gtk3-wayland-avoid-negative-size-constraints.patch.
-------------------------------------------------------------------
Tue Sep 27 15:46:40 UTC 2016 - zaitor@opensuse.org

View File

@ -29,7 +29,7 @@
Name: gtk3
%define _name gtk+
Version: 3.22.0
Version: 3.22.1
Release: 0
Summary: The GTK+ toolkit library (version 3)
License: LGPL-2.1+
@ -44,14 +44,6 @@ Source99: baselibs.conf
Patch0: gtk3-GTK_PATH64.patch
# PATCH-NEEDS-REBASE gtk3-path-local.patch Search in /usr/local/%{_lib} by default. bnc369696 bgo534474 -- Was PATCH-FIX-OPENSUSE
Patch1: gtk3-path-local.patch
# PATCH-FIX-UPSTREAM gtk3-widget-warn-consistency-check-only.patch dimstar@opensuse.org -- : widget: Only warn about missing allocation if G_ENABLE_CONSISTENCY_CHECKS.
Patch2: gtk3-widget-warn-consistency-check-only.patch
# PATCH-FIX-UPSTREAM gtk3-add-missing-annotations.patch bgo#771826 zaitor@opensuse.org -- Add some missing (nullable) annotations, patch from upstream git.
Patch3: gtk3-add-missing-annotations.patch
# PATCH-FIX-UPSTREAM gtk3-wayland-always-sync-state.patch bgo#771553 zaitor@opensuse.org -- Fix black areas when resizing wk based apps
Patch4: gtk3-wayland-always-sync-state.patch
# PATCH-FIX-UPSTREAM gtk3-wayland-avoid-negative-size-constraints.patch bgo#771915 zaitor@opensuse.org -- Fix totem window misplaced after a state change
Patch5: gtk3-wayland-avoid-negative-size-constraints.patch
BuildRequires: cups-devel >= 1.2
BuildRequires: docbook-xsl-stylesheets
BuildRequires: fdupes
@ -347,10 +339,6 @@ cp -a %{S:1} .
%endif
# Patch disabled, needs rebase.
#patch1 -p0
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%build
# Disabled since patch 1 is in need of rebase