Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package pidgin for openSUSE:Factory checked in at 2022-03-24 22:57:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/pidgin (Old) and /work/SRC/openSUSE:Factory/.pidgin.new.1900 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "pidgin" Thu Mar 24 22:57:11 2022 rev:143 rq:964282 version:2.14.8 Changes: -------- --- /work/SRC/openSUSE:Factory/pidgin/pidgin.changes 2021-11-15 15:27:51.493847995 +0100 +++ /work/SRC/openSUSE:Factory/.pidgin.new.1900/pidgin.changes 2022-03-24 22:57:29.156220733 +0100 @@ -1,0 +2,7 @@ +Wed Mar 23 10:21:56 UTC 2022 - Martin Wilck <mwi...@suse.com> + +- Fix the infinite resizing freeze + (boo#1197418, https://issues.imfreedom.org/issue/PIDGIN-17602) + * added rb1342.patch (https://reviews.imfreedom.org/r/1342/) + +------------------------------------------------------------------- New: ---- rb1342.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ pidgin.spec ++++++ --- /var/tmp/diff_new_pack.LIz1kV/_old 2022-03-24 22:57:29.956221505 +0100 +++ /var/tmp/diff_new_pack.LIz1kV/_new 2022-03-24 22:57:29.960221509 +0100 @@ -1,7 +1,7 @@ # # spec file for package pidgin # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -38,6 +38,8 @@ Patch3: pidgin-use-default-alsa.patch # PATCH-FIX-OPENSUSE pidgin-always-enable-intltool.patch mgo...@suse.com -- always enable intltool, needed for autoconf 2.71. Patch4: pidgin-always-enable-intltool.patch +# https://reviews.imfreedom.org/r/1342/ +Patch5: rb1342.patch BuildRequires: ca-certificates-mozilla BuildRequires: doxygen BuildRequires: fdupes @@ -233,6 +235,7 @@ %patch3 -p1 %endif %patch4 -p1 +%patch5 -p1 cp -f %{SOURCE3} %{name}-prefs.xml ++++++ rb1342.patch ++++++ # HG changeset patch # Node ID 8719e6ca6ff4 # Parent 17237faf35cb diff --git a/pidgin/gtkconv.c b/pidgin/gtkconv.c --- a/pidgin/gtkconv.c +++ b/pidgin/gtkconv.c @@ -2361,6 +2361,9 @@ g_return_if_fail(gtkconv != NULL); + g_object_set_data(G_OBJECT(gtkconv->imhtml), "resize-count", + GINT_TO_POINTER(0)); + if (!purple_prefs_get_bool("/purple/conversations/im/send_typing")) return; @@ -2378,6 +2381,9 @@ g_return_if_fail(gtkconv != NULL); + g_object_set_data(G_OBJECT(gtkconv->imhtml), "resize-count", + GINT_TO_POINTER(0)); + conv = gtkconv->active_conv; if (!purple_prefs_get_bool("/purple/conversations/im/send_typing")) @@ -5056,6 +5062,7 @@ gtk_widget_set_name(gtkconv->entry, "pidgin_conv_entry"); gtk_imhtml_set_protocol_name(GTK_IMHTML(gtkconv->entry), purple_account_get_protocol_name(conv->account)); + g_object_set_data(G_OBJECT(gtkconv->entry), "gtkconv", gtkconv); g_signal_connect(G_OBJECT(gtkconv->entry), "populate-popup", G_CALLBACK(entry_popup_menu_cb), gtkconv); diff --git a/pidgin/gtkimhtml.c b/pidgin/gtkimhtml.c --- a/pidgin/gtkimhtml.c +++ b/pidgin/gtkimhtml.c @@ -387,6 +387,8 @@ static void (*parent_size_allocate)(GtkWidget *widget, GtkAllocation *alloc); +#define MAX_RESIZE_COUNT 3 + static void gtk_imhtml_size_allocate(GtkWidget *widget, GtkAllocation *alloc) { GtkIMHtml *imhtml = GTK_IMHTML(widget); @@ -395,6 +397,39 @@ int height = 0, y = 0; GtkTextIter iter; gboolean scroll = TRUE; + PidginConversation *gtkconv; + GtkIMHtml *entry, *messages; + int resize_count; + + gtkconv = g_object_get_data(G_OBJECT(imhtml), "gtkconv"); + + if(gtkconv != NULL) { + entry = GTK_IMHTML(gtkconv->entry); + messages = GTK_IMHTML(gtkconv->imhtml); + + resize_count = GPOINTER_TO_INT( + g_object_get_data( + G_OBJECT(imhtml), "resize-count")); + + if(imhtml == entry) { + if(resize_count > MAX_RESIZE_COUNT) { + return; + } + } else if(imhtml == messages) { + g_object_set_data(G_OBJECT(entry), "resize-count", + GINT_TO_POINTER(0)); + + if(resize_count > MAX_RESIZE_COUNT){ + g_object_set_data(G_OBJECT(messages), "resize-count", + GINT_TO_POINTER(0)); + return; + } + } + + resize_count++; + g_object_set_data(G_OBJECT(imhtml), "resize-count", + GINT_TO_POINTER(resize_count)); + } gtk_text_buffer_get_end_iter(imhtml->text_buffer, &iter);