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/
# -*-shell-script-*-
[Meta]
RootName: @pidgin.im/pidgin:$SOFTWAREVERSION
DisplayName: Pidgin Internet Messenger
ShortName: Pidgin
Maintainer: The Pidgin Developers
URL: http://pidgin.im/
Packager: Tim Ringenbach <marv_sf@users.sourceforge.net>
Summary: A GTK+ based multiprotocol instant messaging client
SoftwareVersion: @VERSION@
InterfaceVersion: 2.0
PackageVersion: 1
[Description]
Pidgin allows you to talk to anyone using a variety of messaging protocols,
including IRC, XMPP,
Gadu-Gadu, and Zephyr. These protocols are implemented using a
modular, easy to use design. To use a protocol, just add an account using the
account editor.
Pidgin supports many common features of other clients, as well as many unique
features, such as perl scripting, TCL scripting and C plugins.
[BuildPrepare]
APBUILD_STATIC="Xss startup-notification-1" prepareBuild --enable-nss --enable-gnutls --enable-binreloc --disable-perl --disable-tcl --disable-gtktest --disable-glibtest --disable-vv --disable-fortify
#APBUILD_STATIC="Xss startup-notification-1" prepareBuild --enable-nss --enable-gnutls --enable-binreloc --disable-perl --disable-tcl --disable-vv
[BuildUnprepare]
unprepareBuild
[Imports]
rm -rf include
rm -rf lib/pkgconfig
find -name '*.la' | xargs rm
echo '*' | import
[Prepare]
# Dependency checking
require @gtk.org/gtk 2.2
require @68k.org/libaudiofile 0.0
require @xiph.org/libao 2.0
require @gtkspell.sourceforge.net/gtkspell 0.0
require @gnutls.org/gnutls 11.0 || { require @mozilla.org/nspr 4 && require @mozilla.org/nss 3; }
[Install]
# Put your installation script here
installExe ./bin/*
installLib ./lib/libpurple-remote.so.0.0.0
# do the plugins
copyFiles ./lib/pidgin "$PREFIX/lib"
installMan 1 ./man/man1/pidgin.1
installDesktop "Networking/Instant Messaging" ./share/applications/pidgin.desktop
installLocale ./share/locale
copyFiles ./share/pixmaps "$PREFIX/share"
copyFiles ./share/sounds "$PREFIX/share"
installIcon ./share/pixmaps/pidgin.png
# install and fix the .pc file
# move this to the -devel package when I make one
# copyFile ./lib/pkgconfig/pidgin.pc "$PREFIX/lib/pkgconfig/pidgin.pc"
# safeSed "$PREFIX/lib/pkgconfig/pidgin.pc" "s|prefix=/usr/local|prefix=$PREFIX|"
[Uninstall]
# Usually just the following line is enough to uninstall everything
uninstallFromLog