aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpsykose <alice@ayaya.dev>2023-06-05 19:20:37 +0000
committerpsykose <alice@ayaya.dev>2023-06-05 21:20:39 +0200
commit16e3cb3b618b971dcf79def7d42eacb5f84d92a3 (patch)
tree2340f77427c7831423a98ac8ff803eb10fcf904c
parent0c94984aca68b2213ff70a97fc89886589765012 (diff)
community/gtk4.0: upgrade to 4.10.4
-rw-r--r--community/gtk4.0/APKBUILD17
-rw-r--r--community/gtk4.0/gtktreeviewmodel-1.patch102
-rw-r--r--community/gtk4.0/gtktreeviewmodel-2.patch108
-rw-r--r--community/gtk4.0/nautilus-width.patch39
-rw-r--r--community/gtk4.0/x11-rendering.patch44
5 files changed, 4 insertions, 306 deletions
diff --git a/community/gtk4.0/APKBUILD b/community/gtk4.0/APKBUILD
index afa378da123..7e104128b7d 100644
--- a/community/gtk4.0/APKBUILD
+++ b/community/gtk4.0/APKBUILD
@@ -1,8 +1,8 @@
# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Pablo Correa Gomez <ablocorrea@hotmail.com>
pkgname=gtk4.0
-pkgver=4.10.3
-pkgrel=3
+pkgver=4.10.4
+pkgrel=0
pkgdesc="The GTK Toolkit (v4)"
url="https://www.gtk.org/"
install="$pkgname.post-install $pkgname.post-upgrade $pkgname.post-deinstall"
@@ -56,12 +56,7 @@ makedepends="
vulkan-loader-dev
zlib-dev
"
-source="https://download.gnome.org/sources/gtk/${pkgver%.*}/gtk-$pkgver.tar.xz
- gtktreeviewmodel-1.patch
- gtktreeviewmodel-2.patch
- nautilus-width.patch
- x11-rendering.patch
- "
+source="https://download.gnome.org/sources/gtk/${pkgver%.*}/gtk-$pkgver.tar.xz"
builddir="$srcdir/gtk-$pkgver"
build() {
@@ -127,9 +122,5 @@ lang() {
}
sha512sums="
-aac4703f9c135271febdd373b24995dabcd08fb0cea2d6014c812f2839ae88926c1939ddcc64ab9728ba3248a1f58260ce73fa6ef5679e54dbb798021adfa324 gtk-4.10.3.tar.xz
-f8798c584b77df87132d76cbc7bb4d2109aa2b2a5077496705c193f4de2a0d8794b986ffed91fcb35707b5e66a70b6fe59a4e98b1323f4fad2ed37630bd8c82f gtktreeviewmodel-1.patch
-afdea0f061668a28a96f0d60aae4bfcb15a4399a1fb96ffd86bc47bca7c931fcfe6c577ed106ff3f680138e73a3127d1d4ef0d52ab4e0f0e4b7e89c4fb867c90 gtktreeviewmodel-2.patch
-07d18200533a153ab9db09d3dc81d929645388e5092087976ef9e69e89b4cfb9665c07a9495cc5c042db9ea600039d72a3c10c4568afe0dadba55403ba5d7b23 nautilus-width.patch
-18e9cc564ec424787f7bd787261fd6be6ec5012f242c6aeb77b0c99353b3fb130954732e24618410d1bc7d528ad81f4e81e35abe9bd8f42ebfd920715b7e0268 x11-rendering.patch
+0c5db3af72227977e11fea3adddec1321b82bcace3c3d10a7c914b8d98b0bdb7994084c0a9e883b24815038bf4a0efe1eb1c4ff79e6838e83cadb6ddf2a1239f gtk-4.10.4.tar.xz
"
diff --git a/community/gtk4.0/gtktreeviewmodel-1.patch b/community/gtk4.0/gtktreeviewmodel-1.patch
deleted file mode 100644
index d8cd5c473cc..00000000000
--- a/community/gtk4.0/gtktreeviewmodel-1.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-Patch-Source: https://gitlab.gnome.org/GNOME/gtk/-/commit/4f47683710bbb4b56c286c6ee6a5c394fcf2b755
---
-From 4f47683710bbb4b56c286c6ee6a5c394fcf2b755 Mon Sep 17 00:00:00 2001
-From: Matthias Clasen <mclasen@redhat.com>
-Date: Wed, 29 Mar 2023 02:23:46 +0000
-Subject: [PATCH] Merge branch 'wip/otte/trelistmodel-fixage' into 'main'
-
-treelistmodel: Don't add items in reverse
-
-Closes #5707
-
-See merge request GNOME/gtk!5744
-
-(cherry picked from commit c5a53f235a2ed1b0acd0a8c29153e62377262d04)
-
-1718db14 treelistmodel: Don't add items in reverse
-cd860beb Add a test for splicing treelistmodel
----
- gtk/gtktreelistmodel.c | 2 +-
- testsuite/gtk/treelistmodel.c | 46 +++++++++++++++++++++++++++++++++++
- 2 files changed, 47 insertions(+), 1 deletion(-)
-
-diff --git a/gtk/gtktreelistmodel.c b/gtk/gtktreelistmodel.c
-index dd3b3009ccc..1e55323c0a4 100644
---- a/gtk/gtktreelistmodel.c
-+++ b/gtk/gtktreelistmodel.c
-@@ -357,7 +357,7 @@ gtk_tree_list_model_items_changed_cb (GListModel *model,
- }
-
- tree_added = added;
-- for (i = 0; i < added; i++)
-+ for (i = added; i-- > 0;)
- {
- child = gtk_rb_tree_insert_before (node->children, child);
- child->parent = node;
-diff --git a/testsuite/gtk/treelistmodel.c b/testsuite/gtk/treelistmodel.c
-index 941ac3d306b..98493a3ba56 100644
---- a/testsuite/gtk/treelistmodel.c
-+++ b/testsuite/gtk/treelistmodel.c
-@@ -261,6 +261,51 @@ test_remove_some (void)
- g_object_unref (tree);
- }
-
-+static void
-+splice (GListStore *store,
-+ guint pos,
-+ guint removed,
-+ guint *numbers,
-+ guint added)
-+{
-+ GObject **objects = g_newa (GObject *, added);
-+ guint i;
-+
-+ for (i = 0; i < added; i++)
-+ {
-+ /* 0 cannot be differentiated from NULL, so don't use it */
-+ g_assert_cmpint (numbers[i], !=, 0);
-+ objects[i] = g_object_new (G_TYPE_OBJECT, NULL);
-+ g_object_set_qdata (objects[i], number_quark, GUINT_TO_POINTER (numbers[i]));
-+ }
-+
-+ g_list_store_splice (store, pos, removed, (gpointer *) objects, added);
-+
-+ for (i = 0; i < added; i++)
-+ g_object_unref (objects[i]);
-+}
-+
-+static void
-+test_splice (void)
-+{
-+ GtkTreeListModel *tree = new_model (100, TRUE);
-+ gpointer item;
-+
-+ assert_model (tree, "100 100 100 99 98 97 96 95 94 93 92 91 90 90 89 88 87 86 85 84 83 82 81 80 80 79 78 77 76 75 74 73 72 71 70 70 69 68 67 66 65 64 63 62 61 60 60 59 58 57 56 55 54 53 52 51 50 50 49 48 47 46 45 44 43 42 41 40 40 39 38 37 36 35 34 33 32 31 30 30 29 28 27 26 25 24 23 22 21 20 20 19 18 17 16 15 14 13 12 11 10 10 9 8 7 6 5 4 3 2 1");
-+ assert_changes (tree, "");
-+
-+ item = g_list_model_get_item (G_LIST_MODEL (tree), 1);
-+ g_assert_true (G_IS_LIST_MODEL (item));
-+ splice (item, 0, 5, (guint[5]) { 300, 301, 302, 303, 304 }, 5);
-+ /* expected */
-+ assert_model (tree, "100 100 300 301 302 303 304 95 94 93 92 91 90 90 89 88 87 86 85 84 83 82 81 80 80 79 78 77 76 75 74 73 72 71 70 70 69 68 67 66 65 64 63 62 61 60 60 59 58 57 56 55 54 53 52 51 50 50 49 48 47 46 45 44 43 42 41 40 40 39 38 37 36 35 34 33 32 31 30 30 29 28 27 26 25 24 23 22 21 20 20 19 18 17 16 15 14 13 12 11 10 10 9 8 7 6 5 4 3 2 1");
-+ /* real outcome */
-+ // assert_model (tree, "100 100 304 303 302 301 300 95 94 93 92 91 90 90 89 88 87 86 85 84 83 82 81 80 80 79 78 77 76 75 74 73 72 71 70 70 69 68 67 66 65 64 63 62 61 60 60 59 58 57 56 55 54 53 52 51 50 50 49 48 47 46 45 44 43 42 41 40 40 39 38 37 36 35 34 33 32 31 30 30 29 28 27 26 25 24 23 22 21 20 20 19 18 17 16 15 14 13 12 11 10 10 9 8 7 6 5 4 3 2 1");
-+ assert_changes (tree, "2-5+5");
-+
-+ g_object_unref (tree);
-+}
-+
- /* Test for https://gitlab.gnome.org/GNOME/gtk/-/issues/4595 */
- typedef struct _DemoNode DemoNode;
-
-@@ -391,6 +436,7 @@ main (int argc, char *argv[])
-
- g_test_add_func ("/treelistmodel/expand", test_expand);
- g_test_add_func ("/treelistmodel/remove_some", test_remove_some);
-+ g_test_add_func ("/treelistmodel/remove_splice", test_splice);
- g_test_add_func ("/treelistmodel/collapse-change", test_collapse_change);
-
- return g_test_run ();
---
-GitLab
-
diff --git a/community/gtk4.0/gtktreeviewmodel-2.patch b/community/gtk4.0/gtktreeviewmodel-2.patch
deleted file mode 100644
index 9ae8cd27d8a..00000000000
--- a/community/gtk4.0/gtktreeviewmodel-2.patch
+++ /dev/null
@@ -1,108 +0,0 @@
-Patch-Source: https://gitlab.gnome.org/GNOME/gtk/-/commit/541de3451cdaef589ab724ccf612d868455f2b31
---
-From 541de3451cdaef589ab724ccf612d868455f2b31 Mon Sep 17 00:00:00 2001
-From: Benjamin Otte <otte.benjamin@googlemail.com>
-Date: Wed, 26 Apr 2023 22:06:40 +0000
-Subject: [PATCH] Merge branch 'wip/otte/treelistmodel-madness' into 'main'
-
-treelistmodel: Be safer during collapsing
-
-See merge request GNOME/gtk!5875
-
-(cherry picked from commit 29e71868298448eb7fa570ed0a75935c235262de)
-
-8766a6fa treelistmodel: Be safer during collapsing
-3c76f3fb treelistmodel: Delay notifies from TreeListRow
----
- gtk/gtktreelistmodel.c | 31 ++++++++++++++++++++++++-------
- 1 file changed, 24 insertions(+), 7 deletions(-)
-
-diff --git a/gtk/gtktreelistmodel.c b/gtk/gtktreelistmodel.c
-index 1e55323c0a4..a4f0fa1d4b9 100644
---- a/gtk/gtktreelistmodel.c
-+++ b/gtk/gtktreelistmodel.c
-@@ -101,8 +101,15 @@ static GParamSpec *properties[NUM_PROPERTIES] = { NULL, };
- static GtkTreeListModel *
- tree_node_get_tree_list_model (TreeNode *node)
- {
-- for (; !node->is_root; node = node->parent)
-- { }
-+ if (node->is_root)
-+ return node->list;
-+
-+ for (node = node->parent; !node->is_root; node = node->parent)
-+ {
-+ /* This can happen during collapsing of a parent node */
-+ if (node->children == NULL)
-+ return NULL;
-+ }
-
- return node->list;
- }
-@@ -316,6 +323,9 @@ gtk_tree_list_model_items_changed_cb (GListModel *model,
- guint i, tree_position, tree_removed, tree_added, n_local;
-
- self = tree_node_get_tree_list_model (node);
-+ if (self == NULL)
-+ return;
-+
- n_local = g_list_model_get_n_items (model) - added + removed;
-
- if (position < n_local)
-@@ -405,10 +415,16 @@ gtk_tree_list_model_clear_node (gpointer data)
- TreeNode *node = data;
-
- if (node->row)
-- gtk_tree_list_row_destroy (node->row);
-+ {
-+ g_object_freeze_notify (G_OBJECT (node->row));
-+ gtk_tree_list_row_destroy (node->row);
-+ }
-
- gtk_tree_list_model_clear_node_children (node);
-
-+ if (node->row)
-+ g_object_thaw_notify (G_OBJECT (node->row));
-+
- g_clear_object (&node->item);
- }
-
-@@ -945,16 +961,12 @@ G_DEFINE_TYPE (GtkTreeListRow, gtk_tree_list_row, G_TYPE_OBJECT)
- static void
- gtk_tree_list_row_destroy (GtkTreeListRow *self)
- {
-- g_object_freeze_notify (G_OBJECT (self));
--
- self->node = NULL;
-
- /* FIXME: We could check some properties to avoid excess notifies */
- g_object_notify_by_pspec (G_OBJECT (self), row_properties[ROW_PROP_DEPTH]);
- g_object_notify_by_pspec (G_OBJECT (self), row_properties[ROW_PROP_EXPANDABLE]);
- g_object_notify_by_pspec (G_OBJECT (self), row_properties[ROW_PROP_EXPANDED]);
--
-- g_object_thaw_notify (G_OBJECT (self));
- }
-
- static void
-@@ -1180,6 +1192,8 @@ gtk_tree_list_row_set_expanded (GtkTreeListRow *self,
- return;
-
- list = tree_node_get_tree_list_model (self->node);
-+ if (list == NULL)
-+ return;
-
- if (expanded)
- {
-@@ -1255,6 +1269,9 @@ gtk_tree_list_row_is_expandable (GtkTreeListRow *self)
- return TRUE;
-
- list = tree_node_get_tree_list_model (self->node);
-+ if (list == NULL)
-+ return FALSE;
-+
- model = tree_node_create_model (list, self->node);
- if (model)
- {
---
-GitLab
-
diff --git a/community/gtk4.0/nautilus-width.patch b/community/gtk4.0/nautilus-width.patch
deleted file mode 100644
index 6430152d432..00000000000
--- a/community/gtk4.0/nautilus-width.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Patch-Source: https://gitlab.gnome.org/GNOME/gtk/-/commit/099955b0c06dbddc9469bd3c8e63673a3a82883f
-https://gitlab.gnome.org/GNOME/nautilus/-/issues/2980
---
-From 099955b0c06dbddc9469bd3c8e63673a3a82883f Mon Sep 17 00:00:00 2001
-From: Benjamin Otte <otte@redhat.com>
-Date: Tue, 16 May 2023 18:08:21 +0200
-Subject: [PATCH] gridview: Add border-spacing where it was missed
-
-We were computing column widths without taking border-spacing into
-account, making them slightly too big.
----
- gtk/gtkgridview.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gtk/gtkgridview.c b/gtk/gtkgridview.c
-index 274f34c3c95..885826a138e 100644
---- a/gtk/gtkgridview.c
-+++ b/gtk/gtkgridview.c
-@@ -657,7 +657,7 @@ gtk_grid_view_measure_list (GtkWidget *widget,
- gtk_grid_view_measure_column_size (self, &col_min, &col_nat);
- for_size = MAX (for_size, col_min * (int) self->min_columns);
- n_columns = gtk_grid_view_compute_n_columns (self, for_size, xspacing, col_min, col_nat);
-- column_size = for_size / n_columns;
-+ column_size = (for_size + xspacing) / n_columns - xspacing;
-
- i = 0;
- row_height = 0;
-@@ -770,7 +770,7 @@ gtk_grid_view_size_allocate (GtkWidget *widget,
- orientation == GTK_ORIENTATION_VERTICAL ? width : height,
- xspacing,
- col_min, col_nat);
-- self->column_width = (orientation == GTK_ORIENTATION_VERTICAL ? width : height) / self->n_columns;
-+ self->column_width = ((orientation == GTK_ORIENTATION_VERTICAL ? width : height) + xspacing) / self->n_columns - xspacing;
- self->column_width = MAX (self->column_width, col_min);
-
- /* step 2: determine height of known rows */
---
-GitLab
-
diff --git a/community/gtk4.0/x11-rendering.patch b/community/gtk4.0/x11-rendering.patch
deleted file mode 100644
index a456f41f77e..00000000000
--- a/community/gtk4.0/x11-rendering.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-Patch-Source: https://gitlab.gnome.org/GNOME/gtk/-/commit/b686ce1cb62dba505120e0f1116c516662a06e30
---
-From b686ce1cb62dba505120e0f1116c516662a06e30 Mon Sep 17 00:00:00 2001
-From: Carlos Garnacho <carlosg@gnome.org>
-Date: Fri, 21 Apr 2023 10:58:19 +0200
-Subject: [PATCH] gdk/x11: Invalidate whole surface after size change
-
-The Expose events following a ConfigureNotify may arrive at
-a time that we did not resize the surface yet, making these
-expose events a no-op. Even though gsk/gtk take care of the
-window content itself, this might lead to unrendered portions
-of the window shadow.
-
-This may be seen with GSK_RENDERER=cairo and GDK_BACKEND=x11,
-attempting to tile a window (e.g. gtk4-demo) left or right.
-The window will show black rectangles or other artifacts in
-the window shadow areas that correspond to the newly painted
-portions (as the window needs to expand vertically).
-
-In order to fix this with a similar behavior to Wayland,
-consider ourselves the whole surface invalidated after resize,
-in order to ensure everything is painted from scratch.
-
-(cherry-picked from commit 24302315fb8f46be141a9eda60e8d107c84a948d)
----
- gdk/x11/gdksurface-x11.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/gdk/x11/gdksurface-x11.c b/gdk/x11/gdksurface-x11.c
-index a76e4824f2e..40f37523cd3 100644
---- a/gdk/x11/gdksurface-x11.c
-+++ b/gdk/x11/gdksurface-x11.c
-@@ -208,6 +208,8 @@ gdk_x11_surface_update_size (GdkX11Surface *self,
- cairo_surface_set_device_scale (self->cairo_surface, scale, scale);
- }
-
-+ gdk_surface_invalidate_rect (surface, NULL);
-+
- return TRUE;
- }
-
---
-GitLab
-