Bump version to 0.2.2

This commit is contained in:
Jonas Ådahl 2024-01-15 22:09:09 +01:00
parent 7fd9a1bba1
commit cb84b87687
5 changed files with 7 additions and 76 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
/libdecor-0.1.1.tar.xz
/libdecor-0.2.0.tar.xz
/libdecor-0.2.1.tar.xz
/libdecor-0.2.2.tar.xz

View File

@ -1,37 +0,0 @@
From 86863f8ed7823acd7a98cf8e9f5ab979a4b6ab1a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
Date: Sat, 2 Dec 2023 21:19:45 +0100
Subject: [PATCH 1/2] gtk: Don't early out of frame free function
We should clean up all of what should be cleaned up, even if we didn't
actually decorate anything. This fixes memory corruption caused by
missing the wl_list_remove() call.
Closes: https://gitlab.freedesktop.org/libdecor/libdecor/-/issues/59
---
src/plugins/gtk/libdecor-gtk.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/src/plugins/gtk/libdecor-gtk.c b/src/plugins/gtk/libdecor-gtk.c
index 9a9bc5e..f15a6ba 100644
--- a/src/plugins/gtk/libdecor-gtk.c
+++ b/src/plugins/gtk/libdecor-gtk.c
@@ -673,13 +673,8 @@ libdecor_plugin_gtk_frame_free(struct libdecor_plugin *plugin,
struct libdecor_frame_gtk *frame_gtk =
(struct libdecor_frame_gtk *) frame;
- /* when in SSD mode, frame_gtk->header is not a proper GTK widget */
- if (!GTK_IS_WIDGET(frame_gtk->header)) return;
- gtk_widget_destroy(frame_gtk->header);
- frame_gtk->header = NULL;
- if (!GTK_IS_WIDGET(frame_gtk->window)) return;
- gtk_widget_destroy(frame_gtk->window);
- frame_gtk->window = NULL;
+ g_clear_pointer (&frame_gtk->header, gtk_widget_destroy);
+ g_clear_pointer (&frame_gtk->window, gtk_widget_destroy);
free_border_component(&frame_gtk->headerbar);
free_border_component(&frame_gtk->shadow);
--
2.41.0

View File

@ -1,34 +0,0 @@
From 394f49b92680620f09438620185f3179a774f903 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
Date: Sat, 2 Dec 2023 21:20:45 +0100
Subject: [PATCH 2/2] gtk: Use g_clear_pointer() in a couple of places
We're writing GTK code, so lets use some of the conveniences from glib.
---
src/plugins/gtk/libdecor-gtk.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/plugins/gtk/libdecor-gtk.c b/src/plugins/gtk/libdecor-gtk.c
index f15a6ba..2c68b2f 100644
--- a/src/plugins/gtk/libdecor-gtk.c
+++ b/src/plugins/gtk/libdecor-gtk.c
@@ -679,13 +679,10 @@ libdecor_plugin_gtk_frame_free(struct libdecor_plugin *plugin,
free_border_component(&frame_gtk->headerbar);
free_border_component(&frame_gtk->shadow);
frame_gtk->shadow_showing = false;
- if (frame_gtk->shadow_blur != NULL) {
- cairo_surface_destroy(frame_gtk->shadow_blur);
- frame_gtk->shadow_blur = NULL;
- }
- free(frame_gtk->title);
- frame_gtk->title = NULL;
+ g_clear_pointer (&frame_gtk->shadow_blur, cairo_surface_destroy);
+
+ g_clear_pointer (&frame_gtk->title, free);
frame_gtk->decoration_type = DECORATION_TYPE_NONE;
--
2.41.0

View File

@ -1,13 +1,11 @@
Name: libdecor
Version: 0.2.1
Release: 2%{?dist}
Version: 0.2.2
Release: 1%{?dist}
Summary: Wayland client side decoration library
License: MIT
URL: https://gitlab.freedesktop.org/libdecor/libdecor
Source: %{url}/-/releases/%{version}/downloads/libdecor-%{version}.tar.xz
Patch0: 0001-gtk-Don-t-early-out-of-frame-free-function.patch
Patch1: 0002-gtk-Use-g_clear_pointer-in-a-couple-of-places.patch
BuildRequires: gcc
BuildRequires: meson
@ -63,6 +61,9 @@ developing applications that use %{name}.
%changelog
* Mon Jan 15 2024 Jonas Ådahl <jadahl@redhat.com> - 0.2.2-1
- Bump version to 0.2.2
* Wed Dec 06 2023 Jonas Ådahl <jadahl@redhat.com> - 0.2.1-2
- Fix crash when hiding/showing

View File

@ -1 +1 @@
SHA512 (libdecor-0.2.1.tar.xz) = 9024e65aba767a2d31d754f0ac3c31319ca2a1d37fb1c33dfc66241b5c44fe11eb7a8400b425c1cc0c7382ab18b93969c4a292a486a086c84573a3334af8be27
SHA512 (libdecor-0.2.2.tar.xz) = ed1dfb86c28f0c84950ea5653e1ae6a83bf274e5ea51c0977ea134481536dffd31e65146c0a0aa8b67a6cad4fb8bc551b4266b04c93493547d43131dc04ea380