mirror of
https://github.com/void-linux/void-packages.git
synced 2025-04-15 21:57:02 +02:00
gtk+3: update to 3.24.41, provide gtk-update-icon-cache
This commit is contained in:
parent
9d18f843b5
commit
f9689fec95
3 changed files with 100 additions and 10 deletions
87
srcpkgs/gtk+3/patches/tiling-fix.patch
Normal file
87
srcpkgs/gtk+3/patches/tiling-fix.patch
Normal file
|
@ -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
|
||||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
gtk+
|
||||
gtk+3
|
Loading…
Add table
Reference in a new issue