Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] gtk+3: update to 3.24.41.
@ 2024-02-29  2:41 ahesford
  2024-02-29 12:00 ` [PR PATCH] [Updated] " ahesford
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: ahesford @ 2024-02-29  2:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 489 bytes --]

There is a new pull request by ahesford against master on the void-packages repository

https://github.com/ahesford/void-packages gtk+3-3.24.41
https://github.com/void-linux/void-packages/pull/48995

gtk+3: update to 3.24.41.
Also pulled an upstream patch that fixes resizing behavior for partially tiled Wayland clients.

#### Testing the changes
- I tested the changes in this PR: **briefly**

A patch file from https://github.com/void-linux/void-packages/pull/48995.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gtk+3-3.24.41-48995.patch --]
[-- Type: text/x-diff, Size: 4413 bytes --]

From a09ad935be737a7f3ee632d934747402fe5d42e3 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Wed, 28 Feb 2024 21:38:20 -0500
Subject: [PATCH] gtk+3: update to 3.24.41.

---
 srcpkgs/gtk+3/patches/tiling-fix.patch | 87 ++++++++++++++++++++++++++
 srcpkgs/gtk+3/template                 |  4 +-
 2 files changed, 89 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/gtk+3/patches/tiling-fix.patch

diff --git a/srcpkgs/gtk+3/patches/tiling-fix.patch b/srcpkgs/gtk+3/patches/tiling-fix.patch
new file mode 100644
index 00000000000000..9e0e815a37fd7a
--- /dev/null
+++ b/srcpkgs/gtk+3/patches/tiling-fix.patch
@@ -0,0 +1,87 @@
+From 9020a6f71e41f02e416f940ca84e4a15d703693d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= <emilio@crisal.io>
+Date: Fri, 12 Jan 2024 19:43:20 +0100
+Subject: [PATCH] [gtk3/wayland] Infer resizable edges for tiled windows if
+ possible.
+
+This fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1871627
+
+All GTK3/4 apps on non-GNOME desktops aren't resizable if they are
+tiled.
+
+This patch makes the non-tiled edges resizable if we have per-edge
+tiling, but not per-edge resizing information.
+
+We might want to make all edges resizable, but that might not be fine
+for tiling compositors.
+---
+ gdk/wayland/gdkwindow-wayland.c | 46 +++++++++++++++++++++++++++++++++
+ 1 file changed, 46 insertions(+)
+
+diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
+index 2bbff80bee5..f09f651ac7a 100644
+--- a/gdk/wayland/gdkwindow-wayland.c
++++ b/gdk/wayland/gdkwindow-wayland.c
+@@ -1664,6 +1664,49 @@ should_use_fixed_size (GdkWindowState state)
+                   GDK_WINDOW_STATE_TILED);
+ }
+ 
++static gboolean
++has_per_edge_tiling_info (GdkWindowState state)
++{
++  return state & (GDK_WINDOW_STATE_TOP_TILED |
++                  GDK_WINDOW_STATE_RIGHT_TILED |
++                  GDK_WINDOW_STATE_BOTTOM_TILED |
++                  GDK_WINDOW_STATE_LEFT_TILED);
++}
++
++static GdkWindowState
++infer_edge_constraints (GdkWindowState state)
++{
++  if (state & (GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_FULLSCREEN))
++    return state;
++
++  if (!(state & GDK_WINDOW_STATE_TILED) || !has_per_edge_tiling_info (state))
++    return state |
++           GDK_WINDOW_STATE_TOP_RESIZABLE |
++           GDK_WINDOW_STATE_RIGHT_RESIZABLE |
++           GDK_WINDOW_STATE_BOTTOM_RESIZABLE |
++           GDK_WINDOW_STATE_LEFT_RESIZABLE;
++
++  if (!(state & GDK_WINDOW_STATE_TOP_TILED))
++    state |= GDK_WINDOW_STATE_TOP_RESIZABLE;
++  if (!(state & GDK_WINDOW_STATE_RIGHT_TILED))
++    state |= GDK_WINDOW_STATE_RIGHT_RESIZABLE;
++  if (!(state & GDK_WINDOW_STATE_BOTTOM_TILED))
++    state |= GDK_WINDOW_STATE_BOTTOM_RESIZABLE;
++  if (!(state & GDK_WINDOW_STATE_LEFT_TILED))
++    state |= GDK_WINDOW_STATE_LEFT_RESIZABLE;
++
++  return state;
++}
++
++static gboolean
++supports_native_edge_constraints (GdkWindowImplWayland *impl)
++{
++  struct gtk_surface1 *gtk_surface = impl->display_server.gtk_surface;
++  if (!gtk_surface)
++    return FALSE;
++  return gtk_surface1_get_version (gtk_surface) >= GTK_SURFACE1_CONFIGURE_EDGES_SINCE_VERSION;
++}
++
+ static void
+ gdk_wayland_window_handle_configure (GdkWindow *window,
+                                      uint32_t   serial)
+@@ -1712,6 +1755,9 @@ gdk_wayland_window_handle_configure (GdkWindow *window,
+   new_state = impl->pending.state;
+   impl->pending.state = 0;
+ 
++  if (!supports_native_edge_constraints (impl))
++    new_state = infer_edge_constraints (new_state);
++
+   fixed_size = should_use_fixed_size (new_state);
+ 
+   saved_size = (width == 0 && height == 0);
+-- 
+GitLab
+
diff --git a/srcpkgs/gtk+3/template b/srcpkgs/gtk+3/template
index bc2ab1ad90fd79..f5e2b966a5129d 100644
--- a/srcpkgs/gtk+3/template
+++ b/srcpkgs/gtk+3/template
@@ -1,6 +1,6 @@
 # Template file for 'gtk+3'
 pkgname=gtk+3
-version=3.24.38
+version=3.24.41
 revision=1
 build_style=meson
 build_helper="gir"
@@ -32,7 +32,7 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://www.gtk.org/"
 distfiles="${GNOME_SITE}/gtk+/${version%.*}/gtk+-${version}.tar.xz"
-checksum=ce11decf018b25bdd8505544a4f87242854ec88be054d9ade5f3a20444dd8ee7
+checksum=47da61487af3087a94bc49296fd025ca0bc02f96ef06c556e7c8988bd651b6fa
 make_check_pre="xvfb-run dbus-run-session"
 # _broken_tests=""
 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Updated] gtk+3: update to 3.24.41.
  2024-02-29  2:41 [PR PATCH] gtk+3: update to 3.24.41 ahesford
@ 2024-02-29 12:00 ` ahesford
  2024-02-29 12:01 ` ahesford
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ahesford @ 2024-02-29 12:00 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 494 bytes --]

There is an updated pull request by ahesford against master on the void-packages repository

https://github.com/ahesford/void-packages gtk+3-3.24.41
https://github.com/void-linux/void-packages/pull/48995

gtk+3: update to 3.24.41.
Also pulled an upstream patch that fixes resizing behavior for partially tiled Wayland clients.

#### Testing the changes
- I tested the changes in this PR: **briefly**

A patch file from https://github.com/void-linux/void-packages/pull/48995.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gtk+3-3.24.41-48995.patch --]
[-- Type: text/x-diff, Size: 8823 bytes --]

From 856fc1245d8351e67308d4f442f3aa799292a4c6 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Wed, 28 Feb 2024 21:38:20 -0500
Subject: [PATCH 1/2] gtk+3: update to 3.24.41, provide gtk-update-icon-cache

---
 srcpkgs/gtk+3/patches/tiling-fix.patch | 87 ++++++++++++++++++++++++++
 srcpkgs/gtk+3/template                 | 23 ++++---
 srcpkgs/gtk-update-icon-cache          |  2 +-
 3 files changed, 102 insertions(+), 10 deletions(-)
 create mode 100644 srcpkgs/gtk+3/patches/tiling-fix.patch

diff --git a/srcpkgs/gtk+3/patches/tiling-fix.patch b/srcpkgs/gtk+3/patches/tiling-fix.patch
new file mode 100644
index 00000000000000..9e0e815a37fd7a
--- /dev/null
+++ b/srcpkgs/gtk+3/patches/tiling-fix.patch
@@ -0,0 +1,87 @@
+From 9020a6f71e41f02e416f940ca84e4a15d703693d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= <emilio@crisal.io>
+Date: Fri, 12 Jan 2024 19:43:20 +0100
+Subject: [PATCH] [gtk3/wayland] Infer resizable edges for tiled windows if
+ possible.
+
+This fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1871627
+
+All GTK3/4 apps on non-GNOME desktops aren't resizable if they are
+tiled.
+
+This patch makes the non-tiled edges resizable if we have per-edge
+tiling, but not per-edge resizing information.
+
+We might want to make all edges resizable, but that might not be fine
+for tiling compositors.
+---
+ gdk/wayland/gdkwindow-wayland.c | 46 +++++++++++++++++++++++++++++++++
+ 1 file changed, 46 insertions(+)
+
+diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
+index 2bbff80bee5..f09f651ac7a 100644
+--- a/gdk/wayland/gdkwindow-wayland.c
++++ b/gdk/wayland/gdkwindow-wayland.c
+@@ -1664,6 +1664,49 @@ should_use_fixed_size (GdkWindowState state)
+                   GDK_WINDOW_STATE_TILED);
+ }
+ 
++static gboolean
++has_per_edge_tiling_info (GdkWindowState state)
++{
++  return state & (GDK_WINDOW_STATE_TOP_TILED |
++                  GDK_WINDOW_STATE_RIGHT_TILED |
++                  GDK_WINDOW_STATE_BOTTOM_TILED |
++                  GDK_WINDOW_STATE_LEFT_TILED);
++}
++
++static GdkWindowState
++infer_edge_constraints (GdkWindowState state)
++{
++  if (state & (GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_FULLSCREEN))
++    return state;
++
++  if (!(state & GDK_WINDOW_STATE_TILED) || !has_per_edge_tiling_info (state))
++    return state |
++           GDK_WINDOW_STATE_TOP_RESIZABLE |
++           GDK_WINDOW_STATE_RIGHT_RESIZABLE |
++           GDK_WINDOW_STATE_BOTTOM_RESIZABLE |
++           GDK_WINDOW_STATE_LEFT_RESIZABLE;
++
++  if (!(state & GDK_WINDOW_STATE_TOP_TILED))
++    state |= GDK_WINDOW_STATE_TOP_RESIZABLE;
++  if (!(state & GDK_WINDOW_STATE_RIGHT_TILED))
++    state |= GDK_WINDOW_STATE_RIGHT_RESIZABLE;
++  if (!(state & GDK_WINDOW_STATE_BOTTOM_TILED))
++    state |= GDK_WINDOW_STATE_BOTTOM_RESIZABLE;
++  if (!(state & GDK_WINDOW_STATE_LEFT_TILED))
++    state |= GDK_WINDOW_STATE_LEFT_RESIZABLE;
++
++  return state;
++}
++
++static gboolean
++supports_native_edge_constraints (GdkWindowImplWayland *impl)
++{
++  struct gtk_surface1 *gtk_surface = impl->display_server.gtk_surface;
++  if (!gtk_surface)
++    return FALSE;
++  return gtk_surface1_get_version (gtk_surface) >= GTK_SURFACE1_CONFIGURE_EDGES_SINCE_VERSION;
++}
++
+ static void
+ gdk_wayland_window_handle_configure (GdkWindow *window,
+                                      uint32_t   serial)
+@@ -1712,6 +1755,9 @@ gdk_wayland_window_handle_configure (GdkWindow *window,
+   new_state = impl->pending.state;
+   impl->pending.state = 0;
+ 
++  if (!supports_native_edge_constraints (impl))
++    new_state = infer_edge_constraints (new_state);
++
+   fixed_size = should_use_fixed_size (new_state);
+ 
+   saved_size = (width == 0 && height == 0);
+-- 
+GitLab
+
diff --git a/srcpkgs/gtk+3/template b/srcpkgs/gtk+3/template
index bc2ab1ad90fd79..06a73a93b68c20 100644
--- a/srcpkgs/gtk+3/template
+++ b/srcpkgs/gtk+3/template
@@ -1,6 +1,6 @@
 # Template file for 'gtk+3'
 pkgname=gtk+3
-version=3.24.38
+version=3.24.41
 revision=1
 build_style=meson
 build_helper="gir"
@@ -17,8 +17,8 @@ configure_args="
  -Dexamples=false
  "
 conf_files="/etc/gtk-3.0/im-multipress.conf"
-hostmakedepends="gettext-devel glib-devel gtk-doc gtk-update-icon-cache perl
- pkg-config $(vopt_if wayland 'wayland-devel wayland-protocols')"
+hostmakedepends="gettext-devel glib-devel gtk-doc perl pkg-config
+ $(vopt_if wayland 'wayland-devel wayland-protocols')"
 makedepends="at-spi2-atk-devel gdk-pixbuf-devel libepoxy-devel pango-devel
  iso-codes $(vopt_if colord 'colord-devel') $(vopt_if cups 'cups-devel')
  $(vopt_if wayland 'libxkbcommon-devel wayland-devel wayland-protocols MesaLib-devel')
@@ -32,7 +32,7 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://www.gtk.org/"
 distfiles="${GNOME_SITE}/gtk+/${version%.*}/gtk+-${version}.tar.xz"
-checksum=ce11decf018b25bdd8505544a4f87242854ec88be054d9ade5f3a20444dd8ee7
+checksum=47da61487af3087a94bc49296fd025ca0bc02f96ef06c556e7c8988bd651b6fa
 make_check_pre="xvfb-run dbus-run-session"
 # _broken_tests=""
 
@@ -55,6 +55,8 @@ desc_option_cloudproviders="Enable integration with cloudproviders, such as Next
 build_options_default="colord cups gir broadway wayland x11"
 if [ -z "$CROSS_BUILD" ]; then
 	build_options_default+=" gtk_doc"
+else
+	hostmakedepends+=" gtk-update-icon-cache"
 fi
 
 pre_check() {
@@ -66,11 +68,6 @@ pre_check() {
 	done
 }
 
-post_install() {
-	rm ${DESTDIR}/usr/bin/gtk-update-icon-cache
-	rm ${DESTDIR}/usr/share/man/man1/gtk-update-icon-cache.1
-}
-
 gtk+3-devel_package() {
 	depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - development files"
@@ -102,3 +99,11 @@ gtk+3-demo_package() {
 		vmove usr/share/icons
 	}
 }
+
+gtk-update-icon-cache_package() {
+	short_desc+=" - icon-cache update tool"
+	pkg_install() {
+		vmove usr/bin/gtk-update-icon-cache
+		vmove usr/share/man/man1/gtk-update-icon-cache.1
+	}
+}
diff --git a/srcpkgs/gtk-update-icon-cache b/srcpkgs/gtk-update-icon-cache
index 50dbbf5fe756db..6dc54ba3851aae 120000
--- a/srcpkgs/gtk-update-icon-cache
+++ b/srcpkgs/gtk-update-icon-cache
@@ -1 +1 @@
-gtk+
\ No newline at end of file
+gtk+3
\ No newline at end of file

From dfa8407f48b5fff4811e9539175d8b57748abf93 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Thu, 29 Feb 2024 06:59:43 -0500
Subject: [PATCH 2/2] gtk+: no longer provide gtk-update-icon-cache

---
 srcpkgs/gtk+/template | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/srcpkgs/gtk+/template b/srcpkgs/gtk+/template
index 06bbda0de1513d..053cabde966c9e 100644
--- a/srcpkgs/gtk+/template
+++ b/srcpkgs/gtk+/template
@@ -1,11 +1,12 @@
 # Template file for 'gtk+'
 pkgname=gtk+
 version=2.24.33
-revision=2
+revision=3
 build_style=gnu-configure
 build_helper="gir"
 configure_args="--enable-man $(vopt_enable cups) --with-xinput $(vopt_enable gir introspection)"
-hostmakedepends="pkg-config perl xmlto glib-devel $(vopt_if gir gobject-introspection)"
+hostmakedepends="pkg-config perl xmlto glib-devel gtk-update-icon-cache
+ $(vopt_if gir gobject-introspection)"
 makedepends="libglib-devel libXcursor-devel
  libXext-devel libXrender-devel libXinerama-devel libXi-devel libXrandr-devel
  libXcomposite-devel libXdamage-devel fontconfig-devel gdk-pixbuf-devel
@@ -19,6 +20,8 @@ homepage="https://gtk.org"
 changelog="https://gitlab.gnome.org/GNOME/gtk/-/raw/gtk-2-24/NEWS"
 distfiles="${GNOME_SITE}/gtk+/2.24/gtk+-${version}.tar.xz"
 checksum=ac2ac757f5942d318a311a54b0c80b5ef295f299c2a73c632f6bfb1ff49cc6da
+# X11 tests fail, not worth bothering on this dying package
+make_check=no
 # gtk-builder-convert
 python_version=3
 
@@ -28,7 +31,7 @@ build_options="gir cups"
 build_options_default="gir cups"
 
 if [ "$CROSS_BUILD" ]; then
-	hostmakedepends+=" automake libtool gtk-doc glib-devel gdk-pixbuf-devel gtk-update-icon-cache"
+	hostmakedepends+=" automake libtool gtk-doc glib-devel gdk-pixbuf-devel"
 fi
 
 pre_configure() {
@@ -43,6 +46,10 @@ pre_configure() {
 post_install() {
 	# Provide a default (icon)theme and font.
 	vinstall ${FILESDIR}/gtkrc 644 usr/share/gtk-2.0
+
+	# This is now provided by gtk+3
+	rm ${DESTDIR}/usr/bin/gtk-update-icon-cache
+	rm ${DESTDIR}/usr/share/man/man1/gtk-update-icon-cache.1
 }
 
 gtk+-devel_package() {
@@ -60,6 +67,7 @@ gtk+-devel_package() {
 		vmove usr/share/aclocal
 	}
 }
+
 gtk+-demo_package() {
 	short_desc+=" - demonstration application"
 	pkg_install() {
@@ -67,10 +75,3 @@ gtk+-demo_package() {
 		vmove usr/share/gtk-2.0/demo
 	}
 }
-gtk-update-icon-cache_package() {
-	short_desc+=" - The GTK+ update icon cache tool"
-	pkg_install() {
-		vmove usr/bin/gtk-update-icon-cache
-		vmove usr/share/man/man1/gtk-update-icon-cache.1
-	}
-}

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: gtk+3: update to 3.24.41.
  2024-02-29  2:41 [PR PATCH] gtk+3: update to 3.24.41 ahesford
  2024-02-29 12:00 ` [PR PATCH] [Updated] " ahesford
@ 2024-02-29 12:01 ` ahesford
  2024-02-29 13:39 ` [PR REVIEW] " sgn
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ahesford @ 2024-02-29 12:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 248 bytes --]

New comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/48995#issuecomment-1970989565

Comment:
By request from @sgn, the `gtk-update-icon-cache` tool is now a subpackage of `gtk+3` rather than `gtk+`.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR REVIEW] gtk+3: update to 3.24.41.
  2024-02-29  2:41 [PR PATCH] gtk+3: update to 3.24.41 ahesford
                   ` (2 preceding siblings ...)
  2024-02-29 13:39 ` [PR REVIEW] " sgn
@ 2024-02-29 13:39 ` sgn
  2024-02-29 13:39 ` sgn
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: sgn @ 2024-02-29 13:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 276 bytes --]

New review comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/48995#discussion_r1507595298

Comment:
```suggestion
hostmakedepends="gettext-devel glib-devel gtk-doc perl pkg-config gdk-pixbuf
```

gtk+3 needs `gdk-pixbuf-pixdata`

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR REVIEW] gtk+3: update to 3.24.41.
  2024-02-29  2:41 [PR PATCH] gtk+3: update to 3.24.41 ahesford
                   ` (3 preceding siblings ...)
  2024-02-29 13:39 ` sgn
@ 2024-02-29 13:39 ` sgn
  2024-02-29 13:57 ` [PR PATCH] [Updated] " ahesford
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: sgn @ 2024-02-29 13:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 304 bytes --]

New review comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/48995#discussion_r1507597847

Comment:
This change can eliminate the `hostmakedepends`
```suggestion
fi

pre_configure() {
	ln -sf /bin/false "${XBPS_WRAPPERDIR}/gtk-update-icon-cache"
}

```

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR REVIEW] gtk+3: update to 3.24.41.
  2024-02-29  2:41 [PR PATCH] gtk+3: update to 3.24.41 ahesford
  2024-02-29 12:00 ` [PR PATCH] [Updated] " ahesford
  2024-02-29 12:01 ` ahesford
@ 2024-02-29 13:39 ` sgn
  2024-02-29 13:39 ` sgn
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: sgn @ 2024-02-29 13:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 302 bytes --]

New review comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/48995#discussion_r1507599068

Comment:
With this change, `gtk-update-icon-cache` is not needed.
```suggestion
pre_configure() {
	ln -sf /bin/false "${XBPS_WRAPPERDIR}/gtk-update-icon-cache"
```

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Updated] gtk+3: update to 3.24.41.
  2024-02-29  2:41 [PR PATCH] gtk+3: update to 3.24.41 ahesford
                   ` (4 preceding siblings ...)
  2024-02-29 13:39 ` sgn
@ 2024-02-29 13:57 ` ahesford
  2024-02-29 14:14 ` ahesford
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ahesford @ 2024-02-29 13:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 494 bytes --]

There is an updated pull request by ahesford against master on the void-packages repository

https://github.com/ahesford/void-packages gtk+3-3.24.41
https://github.com/void-linux/void-packages/pull/48995

gtk+3: update to 3.24.41.
Also pulled an upstream patch that fixes resizing behavior for partially tiled Wayland clients.

#### Testing the changes
- I tested the changes in this PR: **briefly**

A patch file from https://github.com/void-linux/void-packages/pull/48995.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gtk+3-3.24.41-48995.patch --]
[-- Type: text/x-diff, Size: 8996 bytes --]

From ecd3600a76bb51ccfdddd434d721e86acee36901 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Wed, 28 Feb 2024 21:38:20 -0500
Subject: [PATCH 1/2] gtk+3: update to 3.24.41, provide gtk-update-icon-cache

---
 srcpkgs/gtk+3/patches/tiling-fix.patch | 87 ++++++++++++++++++++++++++
 srcpkgs/gtk+3/template                 | 25 +++++---
 srcpkgs/gtk-update-icon-cache          |  2 +-
 3 files changed, 104 insertions(+), 10 deletions(-)
 create mode 100644 srcpkgs/gtk+3/patches/tiling-fix.patch

diff --git a/srcpkgs/gtk+3/patches/tiling-fix.patch b/srcpkgs/gtk+3/patches/tiling-fix.patch
new file mode 100644
index 00000000000000..9e0e815a37fd7a
--- /dev/null
+++ b/srcpkgs/gtk+3/patches/tiling-fix.patch
@@ -0,0 +1,87 @@
+From 9020a6f71e41f02e416f940ca84e4a15d703693d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= <emilio@crisal.io>
+Date: Fri, 12 Jan 2024 19:43:20 +0100
+Subject: [PATCH] [gtk3/wayland] Infer resizable edges for tiled windows if
+ possible.
+
+This fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1871627
+
+All GTK3/4 apps on non-GNOME desktops aren't resizable if they are
+tiled.
+
+This patch makes the non-tiled edges resizable if we have per-edge
+tiling, but not per-edge resizing information.
+
+We might want to make all edges resizable, but that might not be fine
+for tiling compositors.
+---
+ gdk/wayland/gdkwindow-wayland.c | 46 +++++++++++++++++++++++++++++++++
+ 1 file changed, 46 insertions(+)
+
+diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
+index 2bbff80bee5..f09f651ac7a 100644
+--- a/gdk/wayland/gdkwindow-wayland.c
++++ b/gdk/wayland/gdkwindow-wayland.c
+@@ -1664,6 +1664,49 @@ should_use_fixed_size (GdkWindowState state)
+                   GDK_WINDOW_STATE_TILED);
+ }
+ 
++static gboolean
++has_per_edge_tiling_info (GdkWindowState state)
++{
++  return state & (GDK_WINDOW_STATE_TOP_TILED |
++                  GDK_WINDOW_STATE_RIGHT_TILED |
++                  GDK_WINDOW_STATE_BOTTOM_TILED |
++                  GDK_WINDOW_STATE_LEFT_TILED);
++}
++
++static GdkWindowState
++infer_edge_constraints (GdkWindowState state)
++{
++  if (state & (GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_FULLSCREEN))
++    return state;
++
++  if (!(state & GDK_WINDOW_STATE_TILED) || !has_per_edge_tiling_info (state))
++    return state |
++           GDK_WINDOW_STATE_TOP_RESIZABLE |
++           GDK_WINDOW_STATE_RIGHT_RESIZABLE |
++           GDK_WINDOW_STATE_BOTTOM_RESIZABLE |
++           GDK_WINDOW_STATE_LEFT_RESIZABLE;
++
++  if (!(state & GDK_WINDOW_STATE_TOP_TILED))
++    state |= GDK_WINDOW_STATE_TOP_RESIZABLE;
++  if (!(state & GDK_WINDOW_STATE_RIGHT_TILED))
++    state |= GDK_WINDOW_STATE_RIGHT_RESIZABLE;
++  if (!(state & GDK_WINDOW_STATE_BOTTOM_TILED))
++    state |= GDK_WINDOW_STATE_BOTTOM_RESIZABLE;
++  if (!(state & GDK_WINDOW_STATE_LEFT_TILED))
++    state |= GDK_WINDOW_STATE_LEFT_RESIZABLE;
++
++  return state;
++}
++
++static gboolean
++supports_native_edge_constraints (GdkWindowImplWayland *impl)
++{
++  struct gtk_surface1 *gtk_surface = impl->display_server.gtk_surface;
++  if (!gtk_surface)
++    return FALSE;
++  return gtk_surface1_get_version (gtk_surface) >= GTK_SURFACE1_CONFIGURE_EDGES_SINCE_VERSION;
++}
++
+ static void
+ gdk_wayland_window_handle_configure (GdkWindow *window,
+                                      uint32_t   serial)
+@@ -1712,6 +1755,9 @@ gdk_wayland_window_handle_configure (GdkWindow *window,
+   new_state = impl->pending.state;
+   impl->pending.state = 0;
+ 
++  if (!supports_native_edge_constraints (impl))
++    new_state = infer_edge_constraints (new_state);
++
+   fixed_size = should_use_fixed_size (new_state);
+ 
+   saved_size = (width == 0 && height == 0);
+-- 
+GitLab
+
diff --git a/srcpkgs/gtk+3/template b/srcpkgs/gtk+3/template
index bc2ab1ad90fd79..eefde7e9b75f80 100644
--- a/srcpkgs/gtk+3/template
+++ b/srcpkgs/gtk+3/template
@@ -1,6 +1,6 @@
 # Template file for 'gtk+3'
 pkgname=gtk+3
-version=3.24.38
+version=3.24.41
 revision=1
 build_style=meson
 build_helper="gir"
@@ -17,8 +17,8 @@ configure_args="
  -Dexamples=false
  "
 conf_files="/etc/gtk-3.0/im-multipress.conf"
-hostmakedepends="gettext-devel glib-devel gtk-doc gtk-update-icon-cache perl
- pkg-config $(vopt_if wayland 'wayland-devel wayland-protocols')"
+hostmakedepends="gettext-devel glib-devel gtk-doc perl pkg-config
+ gdk-pixbuf $(vopt_if wayland 'wayland-devel wayland-protocols')"
 makedepends="at-spi2-atk-devel gdk-pixbuf-devel libepoxy-devel pango-devel
  iso-codes $(vopt_if colord 'colord-devel') $(vopt_if cups 'cups-devel')
  $(vopt_if wayland 'libxkbcommon-devel wayland-devel wayland-protocols MesaLib-devel')
@@ -32,7 +32,7 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://www.gtk.org/"
 distfiles="${GNOME_SITE}/gtk+/${version%.*}/gtk+-${version}.tar.xz"
-checksum=ce11decf018b25bdd8505544a4f87242854ec88be054d9ade5f3a20444dd8ee7
+checksum=47da61487af3087a94bc49296fd025ca0bc02f96ef06c556e7c8988bd651b6fa
 make_check_pre="xvfb-run dbus-run-session"
 # _broken_tests=""
 
@@ -57,6 +57,10 @@ if [ -z "$CROSS_BUILD" ]; then
 	build_options_default+=" gtk_doc"
 fi
 
+pre_configure() {
+	ln -sf /bin/false "${XBPS_WRAPPERDIR}/gtk-update-icon-cache"
+}
+
 pre_check() {
 	for t in $_broken_tests; do
 		test_dir="testsuite/${t%\/*}"
@@ -66,11 +70,6 @@ pre_check() {
 	done
 }
 
-post_install() {
-	rm ${DESTDIR}/usr/bin/gtk-update-icon-cache
-	rm ${DESTDIR}/usr/share/man/man1/gtk-update-icon-cache.1
-}
-
 gtk+3-devel_package() {
 	depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - development files"
@@ -102,3 +101,11 @@ gtk+3-demo_package() {
 		vmove usr/share/icons
 	}
 }
+
+gtk-update-icon-cache_package() {
+	short_desc+=" - icon-cache update tool"
+	pkg_install() {
+		vmove usr/bin/gtk-update-icon-cache
+		vmove usr/share/man/man1/gtk-update-icon-cache.1
+	}
+}
diff --git a/srcpkgs/gtk-update-icon-cache b/srcpkgs/gtk-update-icon-cache
index 50dbbf5fe756db..6dc54ba3851aae 120000
--- a/srcpkgs/gtk-update-icon-cache
+++ b/srcpkgs/gtk-update-icon-cache
@@ -1 +1 @@
-gtk+
\ No newline at end of file
+gtk+3
\ No newline at end of file

From 539bed06adc7cdb750924799fcfa447aee1ce220 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Thu, 29 Feb 2024 06:59:43 -0500
Subject: [PATCH 2/2] gtk+: no longer provide gtk-update-icon-cache

---
 srcpkgs/gtk+/template | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/srcpkgs/gtk+/template b/srcpkgs/gtk+/template
index 06bbda0de1513d..6b85cfabf2d345 100644
--- a/srcpkgs/gtk+/template
+++ b/srcpkgs/gtk+/template
@@ -1,11 +1,13 @@
 # Template file for 'gtk+'
 pkgname=gtk+
 version=2.24.33
-revision=2
+revision=3
 build_style=gnu-configure
 build_helper="gir"
-configure_args="--enable-man $(vopt_enable cups) --with-xinput $(vopt_enable gir introspection)"
-hostmakedepends="pkg-config perl xmlto glib-devel $(vopt_if gir gobject-introspection)"
+configure_args="--enable-man $(vopt_enable cups) --with-xinput
+ $(vopt_enable gir introspection)"
+hostmakedepends="pkg-config perl xmlto glib-devel
+ $(vopt_if gir gobject-introspection)"
 makedepends="libglib-devel libXcursor-devel
  libXext-devel libXrender-devel libXinerama-devel libXi-devel libXrandr-devel
  libXcomposite-devel libXdamage-devel fontconfig-devel gdk-pixbuf-devel
@@ -19,6 +21,8 @@ homepage="https://gtk.org"
 changelog="https://gitlab.gnome.org/GNOME/gtk/-/raw/gtk-2-24/NEWS"
 distfiles="${GNOME_SITE}/gtk+/2.24/gtk+-${version}.tar.xz"
 checksum=ac2ac757f5942d318a311a54b0c80b5ef295f299c2a73c632f6bfb1ff49cc6da
+# X11 tests fail, not worth bothering on this dying package
+make_check=no
 # gtk-builder-convert
 python_version=3
 
@@ -28,10 +32,12 @@ build_options="gir cups"
 build_options_default="gir cups"
 
 if [ "$CROSS_BUILD" ]; then
-	hostmakedepends+=" automake libtool gtk-doc glib-devel gdk-pixbuf-devel gtk-update-icon-cache"
+	hostmakedepends+=" automake libtool gtk-doc glib-devel gdk-pixbuf-devel"
 fi
 
 pre_configure() {
+	ln -sf /bin/false "${XBPS_WRAPPERDIR}/gtk-update-icon-cache"
+
 	if [ "$CROSS_BUILD" ]; then
 		autoreconf -if
 	fi
@@ -43,6 +49,10 @@ pre_configure() {
 post_install() {
 	# Provide a default (icon)theme and font.
 	vinstall ${FILESDIR}/gtkrc 644 usr/share/gtk-2.0
+
+	# This is now provided by gtk+3
+	rm ${DESTDIR}/usr/bin/gtk-update-icon-cache
+	rm ${DESTDIR}/usr/share/man/man1/gtk-update-icon-cache.1
 }
 
 gtk+-devel_package() {
@@ -60,6 +70,7 @@ gtk+-devel_package() {
 		vmove usr/share/aclocal
 	}
 }
+
 gtk+-demo_package() {
 	short_desc+=" - demonstration application"
 	pkg_install() {
@@ -67,10 +78,3 @@ gtk+-demo_package() {
 		vmove usr/share/gtk-2.0/demo
 	}
 }
-gtk-update-icon-cache_package() {
-	short_desc+=" - The GTK+ update icon cache tool"
-	pkg_install() {
-		vmove usr/bin/gtk-update-icon-cache
-		vmove usr/share/man/man1/gtk-update-icon-cache.1
-	}
-}

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Updated] gtk+3: update to 3.24.41.
  2024-02-29  2:41 [PR PATCH] gtk+3: update to 3.24.41 ahesford
                   ` (5 preceding siblings ...)
  2024-02-29 13:57 ` [PR PATCH] [Updated] " ahesford
@ 2024-02-29 14:14 ` ahesford
  2024-02-29 14:20 ` ahesford
  2024-02-29 16:31 ` [PR PATCH] [Merged]: " ahesford
  8 siblings, 0 replies; 10+ messages in thread
From: ahesford @ 2024-02-29 14:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 494 bytes --]

There is an updated pull request by ahesford against master on the void-packages repository

https://github.com/ahesford/void-packages gtk+3-3.24.41
https://github.com/void-linux/void-packages/pull/48995

gtk+3: update to 3.24.41.
Also pulled an upstream patch that fixes resizing behavior for partially tiled Wayland clients.

#### Testing the changes
- I tested the changes in this PR: **briefly**

A patch file from https://github.com/void-linux/void-packages/pull/48995.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gtk+3-3.24.41-48995.patch --]
[-- Type: text/x-diff, Size: 8523 bytes --]

From ac0aba48c58916e0e9e804cb1cd6c68ee80ebc82 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Wed, 28 Feb 2024 21:38:20 -0500
Subject: [PATCH 1/2] gtk+3: update to 3.24.41, provide gtk-update-icon-cache

---
 srcpkgs/gtk+3/patches/tiling-fix.patch | 87 ++++++++++++++++++++++++++
 srcpkgs/gtk+3/template                 | 21 ++++---
 srcpkgs/gtk-update-icon-cache          |  2 +-
 3 files changed, 100 insertions(+), 10 deletions(-)
 create mode 100644 srcpkgs/gtk+3/patches/tiling-fix.patch

diff --git a/srcpkgs/gtk+3/patches/tiling-fix.patch b/srcpkgs/gtk+3/patches/tiling-fix.patch
new file mode 100644
index 00000000000000..9e0e815a37fd7a
--- /dev/null
+++ b/srcpkgs/gtk+3/patches/tiling-fix.patch
@@ -0,0 +1,87 @@
+From 9020a6f71e41f02e416f940ca84e4a15d703693d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= <emilio@crisal.io>
+Date: Fri, 12 Jan 2024 19:43:20 +0100
+Subject: [PATCH] [gtk3/wayland] Infer resizable edges for tiled windows if
+ possible.
+
+This fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1871627
+
+All GTK3/4 apps on non-GNOME desktops aren't resizable if they are
+tiled.
+
+This patch makes the non-tiled edges resizable if we have per-edge
+tiling, but not per-edge resizing information.
+
+We might want to make all edges resizable, but that might not be fine
+for tiling compositors.
+---
+ gdk/wayland/gdkwindow-wayland.c | 46 +++++++++++++++++++++++++++++++++
+ 1 file changed, 46 insertions(+)
+
+diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
+index 2bbff80bee5..f09f651ac7a 100644
+--- a/gdk/wayland/gdkwindow-wayland.c
++++ b/gdk/wayland/gdkwindow-wayland.c
+@@ -1664,6 +1664,49 @@ should_use_fixed_size (GdkWindowState state)
+                   GDK_WINDOW_STATE_TILED);
+ }
+ 
++static gboolean
++has_per_edge_tiling_info (GdkWindowState state)
++{
++  return state & (GDK_WINDOW_STATE_TOP_TILED |
++                  GDK_WINDOW_STATE_RIGHT_TILED |
++                  GDK_WINDOW_STATE_BOTTOM_TILED |
++                  GDK_WINDOW_STATE_LEFT_TILED);
++}
++
++static GdkWindowState
++infer_edge_constraints (GdkWindowState state)
++{
++  if (state & (GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_FULLSCREEN))
++    return state;
++
++  if (!(state & GDK_WINDOW_STATE_TILED) || !has_per_edge_tiling_info (state))
++    return state |
++           GDK_WINDOW_STATE_TOP_RESIZABLE |
++           GDK_WINDOW_STATE_RIGHT_RESIZABLE |
++           GDK_WINDOW_STATE_BOTTOM_RESIZABLE |
++           GDK_WINDOW_STATE_LEFT_RESIZABLE;
++
++  if (!(state & GDK_WINDOW_STATE_TOP_TILED))
++    state |= GDK_WINDOW_STATE_TOP_RESIZABLE;
++  if (!(state & GDK_WINDOW_STATE_RIGHT_TILED))
++    state |= GDK_WINDOW_STATE_RIGHT_RESIZABLE;
++  if (!(state & GDK_WINDOW_STATE_BOTTOM_TILED))
++    state |= GDK_WINDOW_STATE_BOTTOM_RESIZABLE;
++  if (!(state & GDK_WINDOW_STATE_LEFT_TILED))
++    state |= GDK_WINDOW_STATE_LEFT_RESIZABLE;
++
++  return state;
++}
++
++static gboolean
++supports_native_edge_constraints (GdkWindowImplWayland *impl)
++{
++  struct gtk_surface1 *gtk_surface = impl->display_server.gtk_surface;
++  if (!gtk_surface)
++    return FALSE;
++  return gtk_surface1_get_version (gtk_surface) >= GTK_SURFACE1_CONFIGURE_EDGES_SINCE_VERSION;
++}
++
+ static void
+ gdk_wayland_window_handle_configure (GdkWindow *window,
+                                      uint32_t   serial)
+@@ -1712,6 +1755,9 @@ gdk_wayland_window_handle_configure (GdkWindow *window,
+   new_state = impl->pending.state;
+   impl->pending.state = 0;
+ 
++  if (!supports_native_edge_constraints (impl))
++    new_state = infer_edge_constraints (new_state);
++
+   fixed_size = should_use_fixed_size (new_state);
+ 
+   saved_size = (width == 0 && height == 0);
+-- 
+GitLab
+
diff --git a/srcpkgs/gtk+3/template b/srcpkgs/gtk+3/template
index bc2ab1ad90fd79..1da0b705c24320 100644
--- a/srcpkgs/gtk+3/template
+++ b/srcpkgs/gtk+3/template
@@ -1,6 +1,6 @@
 # Template file for 'gtk+3'
 pkgname=gtk+3
-version=3.24.38
+version=3.24.41
 revision=1
 build_style=meson
 build_helper="gir"
@@ -17,8 +17,8 @@ configure_args="
  -Dexamples=false
  "
 conf_files="/etc/gtk-3.0/im-multipress.conf"
-hostmakedepends="gettext-devel glib-devel gtk-doc gtk-update-icon-cache perl
- pkg-config $(vopt_if wayland 'wayland-devel wayland-protocols')"
+hostmakedepends="gettext-devel glib-devel gtk-doc perl pkg-config
+ $(vopt_if wayland 'wayland-devel wayland-protocols')"
 makedepends="at-spi2-atk-devel gdk-pixbuf-devel libepoxy-devel pango-devel
  iso-codes $(vopt_if colord 'colord-devel') $(vopt_if cups 'cups-devel')
  $(vopt_if wayland 'libxkbcommon-devel wayland-devel wayland-protocols MesaLib-devel')
@@ -32,7 +32,7 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://www.gtk.org/"
 distfiles="${GNOME_SITE}/gtk+/${version%.*}/gtk+-${version}.tar.xz"
-checksum=ce11decf018b25bdd8505544a4f87242854ec88be054d9ade5f3a20444dd8ee7
+checksum=47da61487af3087a94bc49296fd025ca0bc02f96ef06c556e7c8988bd651b6fa
 make_check_pre="xvfb-run dbus-run-session"
 # _broken_tests=""
 
@@ -66,11 +66,6 @@ pre_check() {
 	done
 }
 
-post_install() {
-	rm ${DESTDIR}/usr/bin/gtk-update-icon-cache
-	rm ${DESTDIR}/usr/share/man/man1/gtk-update-icon-cache.1
-}
-
 gtk+3-devel_package() {
 	depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - development files"
@@ -102,3 +97,11 @@ gtk+3-demo_package() {
 		vmove usr/share/icons
 	}
 }
+
+gtk-update-icon-cache_package() {
+	short_desc+=" - icon-cache update tool"
+	pkg_install() {
+		vmove usr/bin/gtk-update-icon-cache
+		vmove usr/share/man/man1/gtk-update-icon-cache.1
+	}
+}
diff --git a/srcpkgs/gtk-update-icon-cache b/srcpkgs/gtk-update-icon-cache
index 50dbbf5fe756db..6dc54ba3851aae 120000
--- a/srcpkgs/gtk-update-icon-cache
+++ b/srcpkgs/gtk-update-icon-cache
@@ -1 +1 @@
-gtk+
\ No newline at end of file
+gtk+3
\ No newline at end of file

From fe500ce3f2a6d3abb7a5d165881b7032460ef665 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Thu, 29 Feb 2024 06:59:43 -0500
Subject: [PATCH 2/2] gtk+: no longer provide gtk-update-icon-cache

---
 srcpkgs/gtk+/template | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/srcpkgs/gtk+/template b/srcpkgs/gtk+/template
index 06bbda0de1513d..053cabde966c9e 100644
--- a/srcpkgs/gtk+/template
+++ b/srcpkgs/gtk+/template
@@ -1,11 +1,12 @@
 # Template file for 'gtk+'
 pkgname=gtk+
 version=2.24.33
-revision=2
+revision=3
 build_style=gnu-configure
 build_helper="gir"
 configure_args="--enable-man $(vopt_enable cups) --with-xinput $(vopt_enable gir introspection)"
-hostmakedepends="pkg-config perl xmlto glib-devel $(vopt_if gir gobject-introspection)"
+hostmakedepends="pkg-config perl xmlto glib-devel gtk-update-icon-cache
+ $(vopt_if gir gobject-introspection)"
 makedepends="libglib-devel libXcursor-devel
  libXext-devel libXrender-devel libXinerama-devel libXi-devel libXrandr-devel
  libXcomposite-devel libXdamage-devel fontconfig-devel gdk-pixbuf-devel
@@ -19,6 +20,8 @@ homepage="https://gtk.org"
 changelog="https://gitlab.gnome.org/GNOME/gtk/-/raw/gtk-2-24/NEWS"
 distfiles="${GNOME_SITE}/gtk+/2.24/gtk+-${version}.tar.xz"
 checksum=ac2ac757f5942d318a311a54b0c80b5ef295f299c2a73c632f6bfb1ff49cc6da
+# X11 tests fail, not worth bothering on this dying package
+make_check=no
 # gtk-builder-convert
 python_version=3
 
@@ -28,7 +31,7 @@ build_options="gir cups"
 build_options_default="gir cups"
 
 if [ "$CROSS_BUILD" ]; then
-	hostmakedepends+=" automake libtool gtk-doc glib-devel gdk-pixbuf-devel gtk-update-icon-cache"
+	hostmakedepends+=" automake libtool gtk-doc glib-devel gdk-pixbuf-devel"
 fi
 
 pre_configure() {
@@ -43,6 +46,10 @@ pre_configure() {
 post_install() {
 	# Provide a default (icon)theme and font.
 	vinstall ${FILESDIR}/gtkrc 644 usr/share/gtk-2.0
+
+	# This is now provided by gtk+3
+	rm ${DESTDIR}/usr/bin/gtk-update-icon-cache
+	rm ${DESTDIR}/usr/share/man/man1/gtk-update-icon-cache.1
 }
 
 gtk+-devel_package() {
@@ -60,6 +67,7 @@ gtk+-devel_package() {
 		vmove usr/share/aclocal
 	}
 }
+
 gtk+-demo_package() {
 	short_desc+=" - demonstration application"
 	pkg_install() {
@@ -67,10 +75,3 @@ gtk+-demo_package() {
 		vmove usr/share/gtk-2.0/demo
 	}
 }
-gtk-update-icon-cache_package() {
-	short_desc+=" - The GTK+ update icon cache tool"
-	pkg_install() {
-		vmove usr/bin/gtk-update-icon-cache
-		vmove usr/share/man/man1/gtk-update-icon-cache.1
-	}
-}

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Updated] gtk+3: update to 3.24.41.
  2024-02-29  2:41 [PR PATCH] gtk+3: update to 3.24.41 ahesford
                   ` (6 preceding siblings ...)
  2024-02-29 14:14 ` ahesford
@ 2024-02-29 14:20 ` ahesford
  2024-02-29 16:31 ` [PR PATCH] [Merged]: " ahesford
  8 siblings, 0 replies; 10+ messages in thread
From: ahesford @ 2024-02-29 14:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 494 bytes --]

There is an updated pull request by ahesford against master on the void-packages repository

https://github.com/ahesford/void-packages gtk+3-3.24.41
https://github.com/void-linux/void-packages/pull/48995

gtk+3: update to 3.24.41.
Also pulled an upstream patch that fixes resizing behavior for partially tiled Wayland clients.

#### Testing the changes
- I tested the changes in this PR: **briefly**

A patch file from https://github.com/void-linux/void-packages/pull/48995.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-gtk+3-3.24.41-48995.patch --]
[-- Type: text/x-diff, Size: 8534 bytes --]

From ea6d31bd5e48ed9c529ae27cf5e4e1ca4f4ef0b3 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Wed, 28 Feb 2024 21:38:20 -0500
Subject: [PATCH 1/2] gtk+3: update to 3.24.41, provide gtk-update-icon-cache

---
 srcpkgs/gtk+3/patches/tiling-fix.patch | 87 ++++++++++++++++++++++++++
 srcpkgs/gtk+3/template                 | 21 ++++---
 srcpkgs/gtk-update-icon-cache          |  2 +-
 3 files changed, 100 insertions(+), 10 deletions(-)
 create mode 100644 srcpkgs/gtk+3/patches/tiling-fix.patch

diff --git a/srcpkgs/gtk+3/patches/tiling-fix.patch b/srcpkgs/gtk+3/patches/tiling-fix.patch
new file mode 100644
index 00000000000000..9e0e815a37fd7a
--- /dev/null
+++ b/srcpkgs/gtk+3/patches/tiling-fix.patch
@@ -0,0 +1,87 @@
+From 9020a6f71e41f02e416f940ca84e4a15d703693d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= <emilio@crisal.io>
+Date: Fri, 12 Jan 2024 19:43:20 +0100
+Subject: [PATCH] [gtk3/wayland] Infer resizable edges for tiled windows if
+ possible.
+
+This fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1871627
+
+All GTK3/4 apps on non-GNOME desktops aren't resizable if they are
+tiled.
+
+This patch makes the non-tiled edges resizable if we have per-edge
+tiling, but not per-edge resizing information.
+
+We might want to make all edges resizable, but that might not be fine
+for tiling compositors.
+---
+ gdk/wayland/gdkwindow-wayland.c | 46 +++++++++++++++++++++++++++++++++
+ 1 file changed, 46 insertions(+)
+
+diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
+index 2bbff80bee5..f09f651ac7a 100644
+--- a/gdk/wayland/gdkwindow-wayland.c
++++ b/gdk/wayland/gdkwindow-wayland.c
+@@ -1664,6 +1664,49 @@ should_use_fixed_size (GdkWindowState state)
+                   GDK_WINDOW_STATE_TILED);
+ }
+ 
++static gboolean
++has_per_edge_tiling_info (GdkWindowState state)
++{
++  return state & (GDK_WINDOW_STATE_TOP_TILED |
++                  GDK_WINDOW_STATE_RIGHT_TILED |
++                  GDK_WINDOW_STATE_BOTTOM_TILED |
++                  GDK_WINDOW_STATE_LEFT_TILED);
++}
++
++static GdkWindowState
++infer_edge_constraints (GdkWindowState state)
++{
++  if (state & (GDK_WINDOW_STATE_MAXIMIZED | GDK_WINDOW_STATE_FULLSCREEN))
++    return state;
++
++  if (!(state & GDK_WINDOW_STATE_TILED) || !has_per_edge_tiling_info (state))
++    return state |
++           GDK_WINDOW_STATE_TOP_RESIZABLE |
++           GDK_WINDOW_STATE_RIGHT_RESIZABLE |
++           GDK_WINDOW_STATE_BOTTOM_RESIZABLE |
++           GDK_WINDOW_STATE_LEFT_RESIZABLE;
++
++  if (!(state & GDK_WINDOW_STATE_TOP_TILED))
++    state |= GDK_WINDOW_STATE_TOP_RESIZABLE;
++  if (!(state & GDK_WINDOW_STATE_RIGHT_TILED))
++    state |= GDK_WINDOW_STATE_RIGHT_RESIZABLE;
++  if (!(state & GDK_WINDOW_STATE_BOTTOM_TILED))
++    state |= GDK_WINDOW_STATE_BOTTOM_RESIZABLE;
++  if (!(state & GDK_WINDOW_STATE_LEFT_TILED))
++    state |= GDK_WINDOW_STATE_LEFT_RESIZABLE;
++
++  return state;
++}
++
++static gboolean
++supports_native_edge_constraints (GdkWindowImplWayland *impl)
++{
++  struct gtk_surface1 *gtk_surface = impl->display_server.gtk_surface;
++  if (!gtk_surface)
++    return FALSE;
++  return gtk_surface1_get_version (gtk_surface) >= GTK_SURFACE1_CONFIGURE_EDGES_SINCE_VERSION;
++}
++
+ static void
+ gdk_wayland_window_handle_configure (GdkWindow *window,
+                                      uint32_t   serial)
+@@ -1712,6 +1755,9 @@ gdk_wayland_window_handle_configure (GdkWindow *window,
+   new_state = impl->pending.state;
+   impl->pending.state = 0;
+ 
++  if (!supports_native_edge_constraints (impl))
++    new_state = infer_edge_constraints (new_state);
++
+   fixed_size = should_use_fixed_size (new_state);
+ 
+   saved_size = (width == 0 && height == 0);
+-- 
+GitLab
+
diff --git a/srcpkgs/gtk+3/template b/srcpkgs/gtk+3/template
index bc2ab1ad90fd79..6775efc6d2136b 100644
--- a/srcpkgs/gtk+3/template
+++ b/srcpkgs/gtk+3/template
@@ -1,6 +1,6 @@
 # Template file for 'gtk+3'
 pkgname=gtk+3
-version=3.24.38
+version=3.24.41
 revision=1
 build_style=meson
 build_helper="gir"
@@ -17,8 +17,8 @@ configure_args="
  -Dexamples=false
  "
 conf_files="/etc/gtk-3.0/im-multipress.conf"
-hostmakedepends="gettext-devel glib-devel gtk-doc gtk-update-icon-cache perl
- pkg-config $(vopt_if wayland 'wayland-devel wayland-protocols')"
+hostmakedepends="gettext-devel glib-devel gtk-doc perl pkg-config
+ gdk-pixbuf $(vopt_if wayland 'wayland-devel wayland-protocols')"
 makedepends="at-spi2-atk-devel gdk-pixbuf-devel libepoxy-devel pango-devel
  iso-codes $(vopt_if colord 'colord-devel') $(vopt_if cups 'cups-devel')
  $(vopt_if wayland 'libxkbcommon-devel wayland-devel wayland-protocols MesaLib-devel')
@@ -32,7 +32,7 @@ maintainer="Enno Boland <gottox@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://www.gtk.org/"
 distfiles="${GNOME_SITE}/gtk+/${version%.*}/gtk+-${version}.tar.xz"
-checksum=ce11decf018b25bdd8505544a4f87242854ec88be054d9ade5f3a20444dd8ee7
+checksum=47da61487af3087a94bc49296fd025ca0bc02f96ef06c556e7c8988bd651b6fa
 make_check_pre="xvfb-run dbus-run-session"
 # _broken_tests=""
 
@@ -66,11 +66,6 @@ pre_check() {
 	done
 }
 
-post_install() {
-	rm ${DESTDIR}/usr/bin/gtk-update-icon-cache
-	rm ${DESTDIR}/usr/share/man/man1/gtk-update-icon-cache.1
-}
-
 gtk+3-devel_package() {
 	depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
 	short_desc+=" - development files"
@@ -102,3 +97,11 @@ gtk+3-demo_package() {
 		vmove usr/share/icons
 	}
 }
+
+gtk-update-icon-cache_package() {
+	short_desc+=" - icon-cache update tool"
+	pkg_install() {
+		vmove usr/bin/gtk-update-icon-cache
+		vmove usr/share/man/man1/gtk-update-icon-cache.1
+	}
+}
diff --git a/srcpkgs/gtk-update-icon-cache b/srcpkgs/gtk-update-icon-cache
index 50dbbf5fe756db..6dc54ba3851aae 120000
--- a/srcpkgs/gtk-update-icon-cache
+++ b/srcpkgs/gtk-update-icon-cache
@@ -1 +1 @@
-gtk+
\ No newline at end of file
+gtk+3
\ No newline at end of file

From 28443fc320c926c03072b9e48d757556be38bf61 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Thu, 29 Feb 2024 06:59:43 -0500
Subject: [PATCH 2/2] gtk+: no longer provide gtk-update-icon-cache

---
 srcpkgs/gtk+/template | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/srcpkgs/gtk+/template b/srcpkgs/gtk+/template
index 06bbda0de1513d..053cabde966c9e 100644
--- a/srcpkgs/gtk+/template
+++ b/srcpkgs/gtk+/template
@@ -1,11 +1,12 @@
 # Template file for 'gtk+'
 pkgname=gtk+
 version=2.24.33
-revision=2
+revision=3
 build_style=gnu-configure
 build_helper="gir"
 configure_args="--enable-man $(vopt_enable cups) --with-xinput $(vopt_enable gir introspection)"
-hostmakedepends="pkg-config perl xmlto glib-devel $(vopt_if gir gobject-introspection)"
+hostmakedepends="pkg-config perl xmlto glib-devel gtk-update-icon-cache
+ $(vopt_if gir gobject-introspection)"
 makedepends="libglib-devel libXcursor-devel
  libXext-devel libXrender-devel libXinerama-devel libXi-devel libXrandr-devel
  libXcomposite-devel libXdamage-devel fontconfig-devel gdk-pixbuf-devel
@@ -19,6 +20,8 @@ homepage="https://gtk.org"
 changelog="https://gitlab.gnome.org/GNOME/gtk/-/raw/gtk-2-24/NEWS"
 distfiles="${GNOME_SITE}/gtk+/2.24/gtk+-${version}.tar.xz"
 checksum=ac2ac757f5942d318a311a54b0c80b5ef295f299c2a73c632f6bfb1ff49cc6da
+# X11 tests fail, not worth bothering on this dying package
+make_check=no
 # gtk-builder-convert
 python_version=3
 
@@ -28,7 +31,7 @@ build_options="gir cups"
 build_options_default="gir cups"
 
 if [ "$CROSS_BUILD" ]; then
-	hostmakedepends+=" automake libtool gtk-doc glib-devel gdk-pixbuf-devel gtk-update-icon-cache"
+	hostmakedepends+=" automake libtool gtk-doc glib-devel gdk-pixbuf-devel"
 fi
 
 pre_configure() {
@@ -43,6 +46,10 @@ pre_configure() {
 post_install() {
 	# Provide a default (icon)theme and font.
 	vinstall ${FILESDIR}/gtkrc 644 usr/share/gtk-2.0
+
+	# This is now provided by gtk+3
+	rm ${DESTDIR}/usr/bin/gtk-update-icon-cache
+	rm ${DESTDIR}/usr/share/man/man1/gtk-update-icon-cache.1
 }
 
 gtk+-devel_package() {
@@ -60,6 +67,7 @@ gtk+-devel_package() {
 		vmove usr/share/aclocal
 	}
 }
+
 gtk+-demo_package() {
 	short_desc+=" - demonstration application"
 	pkg_install() {
@@ -67,10 +75,3 @@ gtk+-demo_package() {
 		vmove usr/share/gtk-2.0/demo
 	}
 }
-gtk-update-icon-cache_package() {
-	short_desc+=" - The GTK+ update icon cache tool"
-	pkg_install() {
-		vmove usr/bin/gtk-update-icon-cache
-		vmove usr/share/man/man1/gtk-update-icon-cache.1
-	}
-}

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Merged]: gtk+3: update to 3.24.41.
  2024-02-29  2:41 [PR PATCH] gtk+3: update to 3.24.41 ahesford
                   ` (7 preceding siblings ...)
  2024-02-29 14:20 ` ahesford
@ 2024-02-29 16:31 ` ahesford
  8 siblings, 0 replies; 10+ messages in thread
From: ahesford @ 2024-02-29 16:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 330 bytes --]

There's a merged pull request on the void-packages repository

gtk+3: update to 3.24.41.
https://github.com/void-linux/void-packages/pull/48995

Description:
Also pulled an upstream patch that fixes resizing behavior for partially tiled Wayland clients.

#### Testing the changes
- I tested the changes in this PR: **briefly**

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-02-29 16:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-29  2:41 [PR PATCH] gtk+3: update to 3.24.41 ahesford
2024-02-29 12:00 ` [PR PATCH] [Updated] " ahesford
2024-02-29 12:01 ` ahesford
2024-02-29 13:39 ` [PR REVIEW] " sgn
2024-02-29 13:39 ` sgn
2024-02-29 13:39 ` sgn
2024-02-29 13:57 ` [PR PATCH] [Updated] " ahesford
2024-02-29 14:14 ` ahesford
2024-02-29 14:20 ` ahesford
2024-02-29 16:31 ` [PR PATCH] [Merged]: " ahesford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).