pidgin/pidgin

Fix the infinite resizing freeze
release-2.x.y
2022-04-15, Belgin Știrbu
0079467afee4
Fix the infinite resizing freeze

This appears related to libpango somehow, as in Debian
Bullseye, libpango splits URLs with dashes at the end,
but in Debian Bookworm, the URLs are not split with dashes
at the end, and the bug does not appear to be triggered
in Bookworm.

This patch makes the assumption that the gtkimhtml widgets
stored in a PidginConversation normally resize in an
alternating manner. However, when the bug is triggered,
only the "entry" gtkimhtml member of PidginConversation
resizes, so we allow "entry" to resize only up to 3 times
in a row.

Testing Done:
Compiled and tested on several desktop environments on a few
GNU/Linux distros by pasting the link mentioned
here https://issues.imfreedom.org/issue/PIDGIN-17413 moving
the cursor at the beginning of the buffer, and holding
the spacebar pressed.

Bugs closed: PIDGIN-16753, PIDGIN-16999, PIDGIN-17287, PIDGIN-17413, PIDGIN-17430, PIDGIN-17568, PIDGIN-17602

Reviewed at https://reviews.imfreedom.org/r/1342/
syntax: glob
.DS_Store
syntax: regexp
(.*/)?TAGS$
(.*/)?\.svn
.*.swp
.*/?.*\.pc$
.*/?Makefile(\.in)?$
.*/?Makefile\.am\.mingw$
.*/perl/common/[^/]+\.c$
.*/perl/common/blib.*
.*/perl/common/pm_to_blib$
.*/perl/common/MYMETA\.(json|yml)
.*~$
.*\.a$
.*\.asc$
.*\.bak$
.*\.bs$
.*\.def$
\.deps
.*\.dll$
.*\.exe$
.*\.g?mo$
.*\.la$
\.libs
.*\.lo$
.*\.loT$
.*\.o$
.*\.orig$
.*\.pyc$
.*\.pyo$
.*\.rej$
.*\.so$
Doxyfile(\.mingw)?$
VERSION$
aclocal.m4
autogen.args
autom4te.*\.cache
compile
config.cache
config.guess
config.h$
config.h.in
config.log
config.status
config.sub
configure$
depcomp
doc/finch.1$
doc/html
doc/pidgin.1$
finch/finch$
finch/libgnt/gntmarshal.c
finch/libgnt/gntmarshal.h
install-sh
intltool-.*
libpurple/dbus-bindings.c
libpurple/dbus-signals.c
libpurple/dbus-types.c
libpurple/dbus-types.h
libpurple/example/nullclient
libpurple/data/gconf/purple.schemas$
libpurple/fuzzers/fuzz_base16_decode$
libpurple/fuzzers/fuzz_html_to_xhtml$
libpurple/fuzzers/fuzz_jabber_caps$
libpurple/fuzzers/fuzz_jabber_id_new$
libpurple/fuzzers/fuzz_markup_is_rtl$
libpurple/fuzzers/fuzz_markup_linkify$
libpurple/fuzzers/fuzz_markup_strip_html$
libpurple/fuzzers/fuzz_mime_decode_field$
libpurple/fuzzers/fuzz_quotedp_decode$
libpurple/fuzzers/fuzz_str_to_time$
libpurple/fuzzers/fuzz_xmlnode$
libpurple/fuzzers/fuzz-.*.log
libpurple/marshallers.[ch]
libpurple/plugins/dbus-example-bindings.c
libpurple/plugins/perl/common/Makefile.PL$
libpurple/plugins/perl/common/Makefile.old
libpurple/plugins/perl/common/const-c.inc
libpurple/plugins/perl/common/const-xs.inc
libpurple/plugins/perl/common/lib
libpurple/purple-client-bindings.c
libpurple/purple-client-bindings.h
libpurple/purple-client-example
libpurple/purple.h$
libpurple/tests/check_libpurple
libpurple/tests/libpurple..
libpurple/tests/test-suite\.log
libpurple/version.h$
libpurple/win32/libpurplerc.rc$
libtool
local.mak
ltmain.sh
missing
mkinstalldirs
package_revision.h
package_revision_raw.txt
pidgin-*.*.*-dbgsym$
pidgin-*.*.*-dbgsym.zip$
pidgin-*.*.*-win32-bin.zip$
pidgin-*.*.*-win32bin$
pidgin-.*.tar.bz2
pidgin-.*.tar.gz
pidgin-[0-9a-z.-]+/
pidgin.apspec$
pidgin.spec$
pidgin/pidgin$
pidgin/data/pidgin.appdata.xml$
pidgin/data/pidgin.desktop$
pidgin/data/pidgin.desktop.in$
pidgin/pixmaps/emotes/default/24/theme
pidgin/pixmaps/emotes/none/theme
pidgin/pixmaps/emotes/small/16/theme
pidgin/plugins/musicmessaging/music-messaging-bindings.c
pidgin/plugins/perl/common/Makefile.PL$
pidgin/plugins/perl/common/Makefile.old
pidgin/win32/nsis/gtk-runtime-*.*.*.*.zip
pidgin/win32/nsis/gtk_runtime_stage$
pidgin/win32/nsis/langmacros.nsh
pidgin/win32/nsis/nsis_translations.desktop
pidgin/win32/nsis/pidgin-spellcheck-preselect.nsh
pidgin/win32/nsis/pidgin-spellcheck.nsh
pidgin/win32/nsis/pidgin-translations.nsh$
pidgin/win32/nsis/translations
pidgin/win32/pidgin_dll_rc.rc$
pidgin/win32/pidgin_exe_rc.rc$
po/Makefile.in.in
po/POTFILES$
po/missing
po/notexist
po/pidgin.pot
po/stamp-it
stamp-h1
test-driver
win32-install-dir(\.release)?
share/ca-certs/certdata.txt