From cdad5d3948245bd967605ee3016ec47fc1b23786 Mon Sep 17 00:00:00 2001 From: Phil Wyett Date: Sat, 7 Jan 2023 11:36:07 +0000 Subject: [PATCH] Add two bug fixes. --- ..._mime_text_formats_for_rdp_clibpoard.patch | 36 +++++++++++++++++++ 0002_fix_unlock_crash.patch | 12 +++++++ remmina.spec | 9 ++++- 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 0001_add_mime_text_formats_for_rdp_clibpoard.patch create mode 100644 0002_fix_unlock_crash.patch diff --git a/0001_add_mime_text_formats_for_rdp_clibpoard.patch b/0001_add_mime_text_formats_for_rdp_clibpoard.patch new file mode 100644 index 0000000..9b584eb --- /dev/null +++ b/0001_add_mime_text_formats_for_rdp_clibpoard.patch @@ -0,0 +1,36 @@ +diff --git a/plugins/rdp/rdp_cliprdr.c b/plugins/rdp/rdp_cliprdr.c +index 75938275ddcff76cb3f7282fdba091cacc2c1f0a..a39e4f4c7603f0960099a7b8f89f8d94973c0715 100644 +--- a/plugins/rdp/rdp_cliprdr.c ++++ b/plugins/rdp/rdp_cliprdr.c +@@ -280,14 +280,20 @@ static UINT remmina_rdp_cliprdr_server_format_list(CliprdrClientContext *context + gchar *gtkFormatName = NULL; + if (format->formatId == CF_UNICODETEXT) { + serverFormatName = "CF_UNICODETEXT"; +- gtkFormatName = "UTF8_STRING"; ++ gtkFormatName = "text/plain;charset=utf-8"; + GdkAtom atom = gdk_atom_intern(gtkFormatName, TRUE); + gtk_target_list_add(list, atom, 0, CF_UNICODETEXT); ++ /* Add also the older UTF8_STRING format for older applications */ ++ atom = gdk_atom_intern("UTF8_STRING", TRUE); ++ gtk_target_list_add(list, atom, 0, CF_UNICODETEXT); + } else if (format->formatId == CF_TEXT) { + serverFormatName = "CF_TEXT"; +- gtkFormatName = "TEXT"; ++ gtkFormatName = "text/plain"; + GdkAtom atom = gdk_atom_intern(gtkFormatName, TRUE); + gtk_target_list_add(list, atom, 0, CF_TEXT); ++ /* Add also the older TEXT format for older applications */ ++ atom = gdk_atom_intern("TEXT", TRUE); ++ gtk_target_list_add(list, atom, 0, CF_TEXT); + } else if (format->formatId == CF_DIB) { + serverFormatName = "CF_DIB"; + if (has_dib_level < 1) +@@ -360,7 +366,7 @@ static UINT remmina_rdp_cliprdr_server_format_list(CliprdrClientContext *context + gtk_target_table_free(target_table, n_targets); + if (n_targets == 0) { + REMMINA_PLUGIN_DEBUG("gp=%p adding a dummy text target (empty text) for local clipboard, because we have no interesting targets from the server. Putting it in the local clipboard cache."); +- GdkAtom atom = gdk_atom_intern("UTF8_STRING", TRUE); ++ GdkAtom atom = gdk_atom_intern("text/plain;charset=utf-8", TRUE); + gtk_target_list_add(list, atom, 0, CF_UNICODETEXT); + pthread_mutex_lock(&clipboard->srv_data_mutex); + clipboard->srv_data = malloc(1); diff --git a/0002_fix_unlock_crash.patch b/0002_fix_unlock_crash.patch new file mode 100644 index 0000000..e889727 --- /dev/null +++ b/0002_fix_unlock_crash.patch @@ -0,0 +1,12 @@ +diff --git a/src/remmina_unlock.c b/src/remmina_unlock.c +index 1a3de304ad8f0bae0fa7183e22537bf8c9e57bdc..d05000f7d81df824a12466d90baac9be0cf797ee 100644 +--- a/src/remmina_unlock.c ++++ b/src/remmina_unlock.c +@@ -75,6 +75,7 @@ void remmina_unlock_timer_destroy() + TRACE_CALL(__func__); + + g_timer_destroy(timer); ++ timer = NULL; + } + + static void remmina_unlock_unlock_clicked(GtkButton *btn, gpointer user_data) diff --git a/remmina.spec b/remmina.spec index cc08df5..9420581 100644 --- a/remmina.spec +++ b/remmina.spec @@ -5,7 +5,7 @@ Name: remmina Version: 1.4.29 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: https://remmina.org @@ -18,6 +18,9 @@ Source0: https://gitlab.com/Remmina/Remmina/-/archive/v%{version}/Remmina-%{vers # So we can't use it directly only as instructions. Source1: pluginBuild-CMakeLists.txt +Patch01: 0001_add_mime_text_formats_for_rdp_clibpoard.patch +Patch02: 0002_fix_unlock_crash.patch + BuildRequires: cmake BuildRequires: cups-devel BuildRequires: desktop-file-utils @@ -334,6 +337,10 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Sat Jan 07 2023 Phil Wyett - 1.4.29-2 +- Add patch: 0001_add_mime_text_formats_for_rdp_clibpoard.patch +- Add patch: 0002_fix_unlock_crash.patch + * Wed Dec 21 2022 Phil Wyett - 1.4.29-1 - New upstream version 1.4.29.