-
-
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 … |
|
|
The imhtml is the widget that's being resized so you don't need to check it against anything else. So the … |
|
|
Add space between ) and { in all ifs. |
|
|
Add surrounding braces. |
|

Commits: |
|
|||||||
---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+38 -20) |
-
-
pidgin/gtkimhtml.c (Diff revision 2) 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: |
|
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
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: |
|
|||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 4 (+82) |

Change Summary:
Add space between
)
and{
in allif
s.
Add surrounding braces.
Commits: |
|
|||||||
---|---|---|---|---|---|---|---|---|
Diff: |
Revision 5 (+84) |
Change Summary:
add additional duplicate bugs
Bugs: |
|
---|

Change Summary:
Fix gtkconv buddy icon going under the gtkimhtml when the user resizes it.
Commits: |
|
|||||||
---|---|---|---|---|---|---|---|---|
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: |
|
|||||||
---|---|---|---|---|---|---|---|---|
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: |
|
|||||||
---|---|---|---|---|---|---|---|---|
Diff: |
Revision 8 (+304 -6) |

Change Summary:
Remove
#define GTK_IMHTML_MAX_CONSEC_RESIZES
fromgtkimhtml.h
, as suggested by QuLogic.
Commits: |
|
|||||||
---|---|---|---|---|---|---|---|---|
Diff: |
Revision 9 (+312 -6) |

Change Summary:
Fix some subtle graphical glitches related to
gtkimhtml
.
Commits: |
|
|||||||
---|---|---|---|---|---|---|---|---|
Diff: |
Revision 10 (+412 -6) |