-
-
This looks good, but it can be simplified quite a bit. You can just store an integer on the entry with
g_object_set_data
andGPOINTER_TO_INT
andGINT_TO_POINTER
. Alsog_object_get_data
will returnNULL
if it doesn't find the data, so that'll be fine for the counter sinceGPOINTER_TO_INT(NULL)
returns 0.That also elimiates the need for the struct member in
PidginConversation
which we can't do because it breaks abi.
Fix the infinite resizing freeze
Review Request #1342 — Created March 13, 2022 and submitted
Information
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.
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.
Summary | ID |
---|---|
dfbe88566f90ddd415bb990c6be0f0a0982362d8 |
Description | From | Last Updated |
---|---|---|
I'd have preferred if this could have been done on the PidginConversation instead of leaking into the GtkIMHtml, but it … |
QuLogic | |
The imhtml is the widget that's being resized so you don't need to check it against anything else. So the … |
grim | |
Add space between ) and { in all ifs. |
QuLogic | |
Add surrounding braces. |
QuLogic |
- Commits:
-
Summary ID 88d76f7069c9ad785cc55ba7d7426d71608534a3 01cb4a76c0425064b0db621ad51cded94063d1da - Diff:
-
Revision 2 (+38 -20)
-
-
The
imhtml
is the widget that's being resized so you don't need to check it against anything else. So the check against entry shouldn't be necessary.You should be able to get away with something like
```c
gpointer raw_resize_count = NULL;
gint resize_count = 0;raw_resize_count = g_object_get_data(G_OBJECT(imhtml), "resize-count");
resize_count = GPOINTER_TO_INT(raw_resize_count);if(resize_count > MAX_RESIZE_COUNT) {
return;
}resize_count++;
g_object_set_data(G_OBJECT(imhtml), "resize-count", GINT_TO_POINTER(resize_count);
- Change Summary:
-
This latest patch should fix the relatively rare case of freezing
caused by aggressively resizing a conversation window that has
the entry box filled with a long URL.I only tested this with XMPP on Debian Bullseye because that's
what I use. - Commits:
-
Summary ID 01cb4a76c0425064b0db621ad51cded94063d1da 94c072f2ebc963a2bfb430458b324b50c8a2fd5c 0306d1656bec79650b13b48ab85e4a7e2a91b884 1ebf180f092803a44ebf29956ddaaad7890c7d69 - Diff:
-
Revision 3 (+89 -21)
- Change Summary:
-
Fix crash when opening About and Settings windows.
Fix graphical glitch related to the resizing of the messages gtkimhtml of a conversation. - Commits:
-
Summary ID 94c072f2ebc963a2bfb430458b324b50c8a2fd5c 0306d1656bec79650b13b48ab85e4a7e2a91b884 1ebf180f092803a44ebf29956ddaaad7890c7d69 33978b71b047187c9756791e4341a586518484f4 - Diff:
-
Revision 4 (+82)
- Change Summary:
-
Add space between
)
and{
in allif
s.
Add surrounding braces. - Commits:
-
Summary ID 33978b71b047187c9756791e4341a586518484f4 8719e6ca6ff4205681cd5bc5ee0422e7f7d78d85 - Diff:
-
Revision 5 (+84)
- Bugs:
- Change Summary:
-
add additional duplicate bugs
- Bugs:
- Change Summary:
-
Fix gtkconv buddy icon going under the gtkimhtml when the user resizes it.
- Commits:
-
Summary ID 8719e6ca6ff4205681cd5bc5ee0422e7f7d78d85 348af8365c3fb4de672a0db96e3af634153351d5 - Diff:
-
Revision 6 (+90)
- Change Summary:
-
Fix more graphical glitches related to the tab bar and the topic bar, as requested by QuLogic on IRC.
- Commits:
-
Summary ID 348af8365c3fb4de672a0db96e3af634153351d5 efd83848371a098fd8760b3b9368ada03e848a75 - Diff:
-
Revision 7 (+122)
- Change Summary:
-
- Fix a few graphical glitches introduced by previous versions of this patch in multi-conversation windows.
- Fix the (hopefully) last edge case that causes pidgin to freeze.
- Commits:
-
Summary ID efd83848371a098fd8760b3b9368ada03e848a75 779731100fa3834a9c747e055c2963f0427183be - Diff:
-
Revision 8 (+304 -6)
- Change Summary:
-
Remove
#define GTK_IMHTML_MAX_CONSEC_RESIZES
fromgtkimhtml.h
, as suggested by QuLogic. - Commits:
-
Summary ID 779731100fa3834a9c747e055c2963f0427183be 2b3e7fb20e0ef80ec89cde9ddcbdff0bc096407e - Diff:
-
Revision 9 (+312 -6)
- Change Summary:
-
Fix some subtle graphical glitches related to
gtkimhtml
. - Commits:
-
Summary ID 2b3e7fb20e0ef80ec89cde9ddcbdff0bc096407e dfbe88566f90ddd415bb990c6be0f0a0982362d8 - Diff:
-
Revision 10 (+412 -6)