GNOME Bugzilla – Bug 580814
bidi: GtkTextLayout incorrectly assumes pango iterates in logical order
Last modified: 2009-05-04 03:27:39 UTC
Please describe the problem: The bug involves the allocate_child_widgets function on gtktextlayout.c:1800. This function iterates over Pango runs using a pango iterator, and sends for each run a signal containing the next object pointer from the list (display->shaped_objects), and the extents returned from pango. The problem is that pango iterates over the runs in visual order, while the shaped_objects list is in logical order, so in some cases the wrong object will be sent. Steps to reproduce: Create a GtkTextView displaying an RTL line including two anchored images. The images will get swapped. Actual results: Expected results: Does this happen every time? Other information:
Created attachment 133675 [details] Testcase. As you can see, the labels are swapped.
Created attachment 133864 [details] [review] patch