Ana Guerrero 2023-11-06 20:14:03 +00:00 committed by Git OBS Bridge
commit d3e92ccca5
3 changed files with 60 additions and 1 deletions

50
gxo-282.patch Normal file
View File

@ -0,0 +1,50 @@
From 036c903e1d6ac8eee72d920d7019c7836381fa2a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ga=C3=ABl=20Bonithon?= <gael@xfce.org>
Date: Mon, 23 Oct 2023 19:24:09 +0200
Subject: [PATCH] Do not reconnect accels when closing last tab
G_IS_OBJECT and similar derived macros are not valid tests of whether an
object is still alive. They are intended to test the type of an object
assumed to be alive (although they return FALSE for a null pointer for
convenience).
This can cause a crash on some systems when closing last tab if
/misc-always-show-tabs is TRUE.
Fixes: 31712a009ec4db4a0731431905a169fe610286e5
---
terminal/terminal-screen.c | 3 +--
terminal/terminal-window.c | 3 ++-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/terminal/terminal-screen.c b/terminal/terminal-screen.c
index 6fe8f1c2..52ee7549 100644
--- a/terminal/terminal-screen.c
+++ b/terminal/terminal-screen.c
@@ -3151,8 +3151,7 @@ terminal_screen_widget_append_accels (TerminalScreen *screen,
{
terminal_return_if_fail (TERMINAL_IS_SCREEN (screen));
- if (G_LIKELY (G_IS_OBJECT (screen->terminal)))
- g_object_set (G_OBJECT (screen->terminal), "accel-group", accel_group, NULL);
+ g_object_set (G_OBJECT (screen->terminal), "accel-group", accel_group, NULL);
}
diff --git a/terminal/terminal-window.c b/terminal/terminal-window.c
index fc830237..71767208 100644
--- a/terminal/terminal-window.c
+++ b/terminal/terminal-window.c
@@ -2577,7 +2577,8 @@ terminal_window_do_close_tab (TerminalScreen *screen,
gtk_widget_destroy (GTK_WIDGET (screen));
/* reconnect the accels of the active terminal */
- terminal_screen_widget_append_accels (window->priv->active, window->priv->accel_group);
+ if (screen != window->priv->active)
+ terminal_screen_widget_append_accels (window->priv->active, window->priv->accel_group);
}
--
GitLab

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Sun Nov 5 18:12:55 UTC 2023 - Marcel Kuehlhorn <tux93@opensuse.org>
- Add gxo-282.patch
* backport fix for crash on window close
(gxo#apps/xfce4-terminal#282)
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Oct 15 07:29:34 UTC 2023 - Manfred Hollstein <manfred.h@gmx.net> Sun Oct 15 07:29:34 UTC 2023 - Manfred Hollstein <manfred.h@gmx.net>

View File

@ -26,6 +26,8 @@ License: GPL-2.0-or-later
Group: System/X11/Terminals Group: System/X11/Terminals
URL: https://docs.xfce.org/apps/terminal/start URL: https://docs.xfce.org/apps/terminal/start
Source0: https://archive.xfce.org/src/apps/xfce4-terminal/1.1/%{name}-%{version}.tar.bz2 Source0: https://archive.xfce.org/src/apps/xfce4-terminal/1.1/%{name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM: backport fix for crash on window close
Patch0: gxo-282.patch
BuildRequires: intltool BuildRequires: intltool
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: update-desktop-files BuildRequires: update-desktop-files
@ -52,7 +54,7 @@ helps to save space on the desktop.
%lang_package %lang_package
%prep %prep
%setup -q %autosetup -p1
%build %build
%if %{with git} %if %{with git}