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

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).